[edit] C# DateTime.Date Property
The DateTime Date property simply returns the date part of a datetime object and will initailize the time part to 12:00:00 AM. It is very similar to the Today property.
[edit] Syntax
DateTime Variable = DateTime.property.Date;;
[edit] Example
using System;
class Program
{
static void Main()
{
DateTime d1 = DateTime.Now.Date;
Console.WriteLine(d1.ToString());
Console.Read();
}
}
Output:
4/4/2007 12:00:00 AM
<= DateTime Tutorial
|