CSharp examples for System:DateTime Calculate
Returns the date part of the DateTime structure
using System;//from ww w . j a va 2s. c o m public class Main{ /// <summary> /// Returns the date part of the DateTime structure /// </summary> /// <param name="source">The t.</param> /// <returns></returns> public static DateTime ToDate(this DateTime source) { return new DateTime(source.Year, source.Month, source.Day); } }