C#中使用DateTime.ToString()转换输出日期
来源:互联网 发布:朱炫 知乎 编辑:程序博客网 时间:2024/06/17 16:21
发表此帖主要反对博客园的一篇帖子:http://www.cnblogs.com/yjmyzz/archive/2010/10/22/1858333.html
DateTime dt = DateTime.Now; Response.Write(dt.ToString("yyyy\\/MM\\/dd HH:mm:ss")); Response.Write("<br>"); Response.Write(dt.ToString("yyyy/MM/dd HH:mm:ss")); Response.Write("<br>"); Response.Write(dt.ToString("yyyy-MM-dd HH:mm:ss")); Response.Write("<br>"); Response.Write(dt.ToString("yyyyMMdd HH:mm:ss"));
输出结果:
2012/09/12 17:21:15
2012/09/12 17:21:15
2012-09-12 17:21:15
20120912 17:21:15
- C#中使用DateTime.ToString()转换输出日期
- DateTime.ToString(string format)输出日期【转】
- C# 中DateTime.Now.ToString()
- C# - 利用DateTime.ToString(string format)输出不同格式的日期
- C# DateTime ToString 时间转换详解
- C# DateTime ToString 时间转换详解
- C# DateTime ToString 时间转换详解
- 用DateTime.ToString(string format)输出不同格式的日期
- 用DateTime.ToString(string format)输出不同格式的日期
- DateTime.ToString(string format)输出不同格式的日期
- 用DateTime.ToString(string format)输出不同格式的日期
- .Net日期时间格式化输出大全 DateTime.ToString()
- .Net日期时间格式化输出大全 DateTime.ToString(?)
- DateTime.ToString(string format)输出不同格式的日期
- 用DateTime.ToString(string format)输出不同格式的日期
- 用DateTime.ToString(string format)输出不同格式的日期
- 用DateTime.ToString(string format)输出不同格式的日期
- 用DateTime.ToString(string format)输出不同格式的日期
- 解压和生成 system.img&data.img ( yaffs2格式)
- 关于青春
- fopen_s打开文件方式的选择
- VC6.0 中如何对齐零乱的代码
- cxf 创建webservice
- C#中使用DateTime.ToString()转换输出日期
- 开源PhoneGap版图书商城
- Ubuntu系统中eclipse插件sqlexplorer_plugin-3.6.1_SR6的安装和配置
- 计算任意一天是星期几的问题
- FFmpeg windows平台编译
- 数据库创建视图时如何指定自定义列的类型
- undefined reference to 'std::basic_string
- Android中获取应用程序(包)的大小-----PackageManager的使用(二)
- 双机热备常识