有关DateTime的几个格式.
- Console.WriteLine("DateTime.Today:\t"+DateTime.Today.ToString());
- Console.WriteLine("DateTime.Now:\t"+DateTime.Now.ToString());
- Console.WriteLine("DateTime.UtcNow:\t" + DateTime.UtcNow.ToString());
- Console.WriteLine("new DateTime():\t"+new DateTime().ToString());
- Console.WriteLine("new DateTime().ToLocalTime():\t" + new DateTime().ToLocalTime().ToString());
- Console.WriteLine("new DateTime().ToShortDateString():\t"+new DateTime().ToShortDateString());
- Console.WriteLine("new DateTime().ToShortTimeString():\t"+new DateTime().ToShortTimeString());
- Console.WriteLine("new DateTime().ToLongDateString():\t" + new DateTime().ToLongDateString());
- Console.WriteLine("new DateTime().ToLongTimeString():\t"+new DateTime().ToLongTimeString());
- Console.WriteLine("new DateTime().ToUniversalTime():\t" + new DateTime().ToUniversalTime().ToString());
创新互联,专注为中小企业提供官网建设、营销型网站制作、成都响应式网站建设、展示型成都网站建设、成都网站设计等服务,帮助中小企业通过网站体现价值、有效益。帮助企业快速建站、解决网站建设与网站营销推广问题。
新闻标题:有关DateTime的几个格式.
文章分享:http://azwzsj.com/article/gdpehp.html