DateTime
大蛮
目前学习中
展开
-
Sql Server datetime 常用日期格式转换
我们经常出于某种目的需要使用各种各样的日期格式,当然我们可以使用字符串操作来构造各种日期格式,但是有现成的函数为什么不用呢? SQL Server中文版的默认的日期字段datetime格式是yyyy-mm-dd Thh:mm:ss.mmm 例如: select getdate() 2004-09-12 11:06:08.177 整理了一下SQL Server转载 2011-11-10 19:16:43 · 388 阅读 · 0 评论 -
C# 时间格式 DateTime Format
DateTime dt = DateTime.Now; string[] str = new string[16]; Console.WriteLine(); str[0] = string.Format("{0:d}", dt);//2005-11-5 str[1] = string.Format("{0:D}", dt);//2005年11月5日 str[2] = string.转载 2011-11-10 19:23:18 · 914 阅读 · 0 评论