Console.WriteLine(string.Format("ToLongDateString:{0}", DateTime.Now.ToLongDateString()));
Console.WriteLine(string.Format("ToLongTimeString:{0}", DateTime.Now.ToLongTimeString()));
Console.WriteLine(string.Format("ToOADate:{0}", DateTime.Now.ToOADate()));
Console.WriteLine(string.Format("ToShortDateString:{0}", DateTime.Now.ToShortDateString()));
Console.WriteLine(string.Format("ToShortTimeString:{0}", DateTime.Now.ToShortTimeString()));
Console.WriteLine(string.Format("ToString:{0}", DateTime.Now.ToString()));
Console.WriteLine(string.Format("ToString(\"yyyy - MM - dd HH:mm:ss.ffff\"):{0}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")));

运行结果:

ToLongDateString:2017年9月21日

ToLongTimeString:16:02:30

ToOADate:42999.6684130671

ToShortDateString:2017/9/21

ToShortTimeString:16:02

ToString:2017/9/21 16:02:30

ToString("yyyy - MM - dd HH:mm:ss.ffff"):2017-09-21 16:02:30.8921

最新文章

  1. linux下php-mysql拓展安装
  2. Java socket长连接代码实现
  3. 基于jquery的tips悬浮消息提示插件tipso
  4. 【UOJ#33】【UR#2】树上GCD 有根树点分治 + 容斥原理 + 分块
  5. React的第一步
  6. scrapy 登录
  7. Rails--bundle exec rake db:migrate
  8. redis 笔记06 发布与订阅、事务、慢查询日志、监视器
  9. C++ Template之技巧性基础知识
  10. 【nodejs】json value出现 undefined 将会无法解析 问题来了
  11. iOS 数组越界 Crash加工经验
  12. poj3261 -- Milk Patterns
  13. 询问任意区间的min,max,gcd,lcm,sum,xor,or,and
  14. javascript-array函数实例
  15. 在MyEclipse 2014中给Spket增加ExtJS提示
  16. 社交系统/社群系统“ThinkSNS+”H5及PC端终于来了!一起来“找茬”
  17. Python 爬虫 爬校花网!!
  18. Linux学习之用户身份与文件权限
  19. IntelliJ IDEA部署tomcat时Edit Configuration Deployment无artifact选项
  20. Oracle通过Navicat导入表数据与机构,数据无法直接查询,需要加双引号的问题

热门文章

  1. oracle 中日期的加减
  2. 为什么 ["1", "2", "3"].map(parseInt) 返回 [1,NaN,NaN]?
  3. 【hdu 1527】取石子游戏
  4. Android Xfermode 真实 实现全面、圆角图片
  5. JS----checked----checked选中和未选中的获取
  6. 一道SQL题考你数据库的使用能力
  7. 手机预览微信小程序
  8. 前端后端分离,怎么解决SEO优化的问题呢?
  9. java 中的两个常用命令
  10. Array.prototype.forEach()&&Array.prototype.map()