DateTime返回yyyy-MM-dd HH:mm:ss格式
This commit is contained in:
parent
1e07de9184
commit
e442a099e6
|
@ -109,6 +109,12 @@ namespace Falcon.SugarApi
|
|||
/// <param name="date">时间</param>
|
||||
/// <returns>格式化时间字符串</returns>
|
||||
public static string ToTime(this DateTime date) => date.ToString("HH:mm:ss");
|
||||
/// <summary>
|
||||
/// 返回日期时间格式字符串。格式yyyy-MM-dd HH:mm:ss
|
||||
/// </summary>
|
||||
/// <param name="date">时间</param>
|
||||
/// <returns>格式化时间字符串</returns>
|
||||
public static string ToDateTime(this DateTime date) => date.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user