Monday, November 30, 2009

Difference between System.DateTime.Now and System.DateTime.Today

Per Microsoft:
Because it returns the current date without the current time, the Today property is suitable for use in applications that work with dates only. For details, see Choosing Between DateTime, DateTimeOffset, and TimeZoneInfo. In contrast, the TimeOfDay property returns the current time without the current date, and the Now property returns both the current date and the current time.

No comments: