This documentation is archived and is not being maintained.
DateTime.Now Property
.NET Framework 1.1
Gets a DateTime that is the current local date and time on this computer.
[Visual Basic] Public Shared ReadOnly Property Now As DateTime [C#] public static DateTime Now {get;} [C++] public: __property static DateTime get_Now(); [JScript] public static function get Now() : DateTime;
Property Value
A DateTime whose value is the current date and time.
Remarks
The resolution of this property depends on the system timer.
| System | Approximate Resolution |
|---|---|
| Windows NT 3.5 and later | 10 milliseconds |
| Windows 98 | 55 milliseconds |
.NET Compact Framework Platform Note: In Windows CE .NET, time is specific only to the second. You can get a more precise time span measurement, for example, in milliseconds, by using the TickCount property.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard
See Also
Show: