VB.Net program to demonstrate the MinValue property of DateTime class

Here, we are going to demonstrate the MinValue property of DateTime class in VB.Net.
Submitted by Nidhi, on January 21, 2021

The MinValue property of DateTime is a read only property, which is used to get the minimum value for an object of the DateTime class.


Date.MinValue as Date

Program/Source Code:

The source code to demonstrate the MinValue property of the DateTime class is given below. The given program is compiled and executed successfully.

'VB.NET program to demonstrate MinValue property of 
'DateTime class.

Imports System

Module Module1
    Sub Main()
        Dim mindate As DateTime

        mindate = DateTime.MinValue

        Console.WriteLine("Minimum date value: {0}", mindate)
    End Sub
End Module


Minimum date value: 01-01-0001 00:00:00
Press any key to continue . . .


In the above program, we created a module Module1 that contains the Main() function. The Main() function is the entry point for the program.

In the Main() function, we created a reference of DateTime class and then get the minimum supported value for an object of the DateTime class and print that value on the console screen.

VB.Net Date & Time Programs »


Comments and Discussions!


Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© some rights reserved.