My Technical Notes

Tuesday, 21 July 2015

C#: Stringifying DateTime to SQL Date format


static string FormatAsSqlDate(DateTime date)
{
    return date.ToString("yyyy-MM-dd");
}

No comments: