반응형

"2011-29-01 12:00 am"

DateTime dt;
DateTime.TryParseExact(dateTime, 
                       "yyyy-dd-MM hh:mm tt", 
                       CultureInfo.InvariantCulture, 
                       DateTimeStyles.None, 
                       out dt);

 

"20180318 064654"

DateTime dt;
DateTime.TryParseExact(dateTime, 
                       "yyyyMMdd HHmmss", 
                       CultureInfo.InvariantCulture, 
                       DateTimeStyles.None, 
                       out dt);
반응형

+ Recent posts