Mistři v programování na #hovnokod

C# #2633

public static string ToyyyyMMdd(this DateTime? value)
{
    if(value==null)
        return "";

    DateTime dt=(DateTime)value;

    return dt.Year.ToString() + "/" + dt.Month.ToString() + "/" + dt.Day.ToString() + " " + dt.Hour + ":" + dt.Minute + ":" + dt.Second;
}

Anonymous,