|
|
@@ -0,0 +1,21 @@
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
+using System.Linq;
|
|
|
+using System.Text;
|
|
|
+using System.Threading.Tasks;
|
|
|
+
|
|
|
+namespace Y.Utils.TimeUtils
|
|
|
+{
|
|
|
+ public sealed class DateTimeConvert
|
|
|
+ {
|
|
|
+ /// <summary>
|
|
|
+ /// yyyy-MM-dd HH:mm:ss
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dt"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static string ToStandardString(DateTime dt)
|
|
|
+ {
|
|
|
+ return dt.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|