C# 中 2011-1-10 13:42:54 转换成 "2011-1-10" 的方法

it2022-05-09  35

DateTime dt = 2011-1-10 13:42:54 (数据库中存储的值)

string  date = DateTime.Prase(dt.tostring()).toSthortString();  结果是字符串: "2011-1-10"

转载于:https://www.cnblogs.com/shuming/archive/2011/02/19/1958637.html


最新回复(0)