ToReversedDateTime

internal static string ToReversedDateTime(this DateTime value)
{
    return string.Format("{0:u}", value);
}
Example:
string reversed = DateTime.Now.ToReversedDateTime();

Description

Takes a DateTime object and reverses it to an SQL type string (yyyy-mm-dd hh:MM:ss)

Details

Double click on the code to select all.

 

;