CSharp examples for System:DateTime Format
To Sql Date
using System;/*from w ww. j a va2s .c o m*/ public class Main{ public static string ToSqlDate(this DateTime? date) { return date == null ? null : date.Value.ToString("yyyy-MM-dd"); } }