|
@@ -1355,14 +1355,15 @@ namespace OASystem.API.OAMethodLib
|
|
|
/// <summary>
|
|
|
/// 验证数字字符串
|
|
|
/// </summary>
|
|
|
- /// <param name="num"></param>
|
|
|
+ /// <param name="str"></param>
|
|
|
/// <returns></returns>
|
|
|
public static string ConvertToDatetime(this string str)
|
|
|
{
|
|
|
if (!string.IsNullOrEmpty(str))
|
|
|
{
|
|
|
+ DateTime currentDate = Convert.ToDateTime(str);
|
|
|
|
|
|
- return Convert.ToDateTime(str).ToString("yyyy年MM月dd日");
|
|
|
+ return $"{currentDate.Year}年{currentDate.Month}月{currentDate.Day}日";
|
|
|
}
|
|
|
|
|
|
return "";
|