从C#中的日期中删除时间戳? [英] Remove timestamp from date in C#?
本文介绍了从C#中的日期中删除时间戳?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这样的日期:2011-03-29 00:00:00.000
I have a date like this: 2011-03-29 00:00:00.000
我想从中删除时间戳,有可能吗?
I want to remove the timestamp from that, is that possible?
谢谢:-)
推荐答案
DateTime类的实例具有ToShortDateString方法,仅显示日期
Instance of DateTime class has ToShortDateString method that displays Date only
这篇关于从C#中的日期中删除时间戳?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文