惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
Stack Overflow Blog
Stack Overflow Blog
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
L
LangChain Blog
T
The Blog of Author Tim Ferriss
J
Java Code Geeks
Y
Y Combinator Blog
月光博客
月光博客
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Fortinet All Blogs
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
小众软件
小众软件
H
Help Net Security
Last Week in AI
Last Week in AI
B
Blog RSS Feed
宝玉的分享
宝玉的分享
N
Netflix TechBlog - Medium
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog

博客园 - 希冀

令人讨厌的CLOSE_WAIT状态的生成原因 令人头痛的字符集问题 原创:运用ifstream的getline时需要注意的问题 Linux 系统的单用户模式、修复模式、跨控制台登录在系统修复中的运用 linux命令知多少(不断更新中......) linux内存管理--top下信息的分析【转帖】 转: 用”堆栈区数据复制”理解Java赋值和参数传递机制的心得 SNMP 资料搜集 linux shell 检查进程PID linux/unix 下 vi 的用法. C++中如何去掉std::string对象的首尾空格 使用const 提高函数的健壮性 [转]Install ACE in Linux (摘)Who are the best programmers? 初识vi和python 学习札记四:操作符(&,∧,| 与 &&,||) 学习札记三:数据类型 学习札记一:格式项的语法{index[,alignment][:formatString]} 走上.NET征程
学习札记二:格式项的语法{index[,alignment][:formatString]}...
希冀 · 2006-08-31 · via 博客园 - 希冀

当格式项对应的输出数据类型为DateTime时:
         formatString项                    {index:formatString}   结果
         (d) Short date:                     {0:d}                         2006-8-31
         (D) Long date:                     {0:D}                        2006年8月31日
         (t) Short time:                      {0:t}                          16:32
         (T) Long time:                     {0:T}                         16:32:46
         (f) Full date/short time:         {0:f}                          2006年8月31日 16:32
         (F) Full date/long time:         {0:F}                         2006年8月31日 16:32:46
         (g) General date/short time:   {0:g}                         2006-8-31 16:32
         (G) General date/long time:   {0:G}                        2006-8-31 16:32:46
             (default):                          {0} (default = 'G')      2006-8-31 16:32:46
         (M) Month:                          {0:M}                        8月31日
         (R) RFC1123:                      {0:R}                         Thu, 31 Aug 2006 16:32:46 GMT
         (s) Sortable:                         {0:s}                          2006-08-31T16:32:46
         (u) Universal sortable:           {0:u} (invariant)          2006-08-31 16:32:46Z(invariant)
         (U) Universal sortable:          {0:U}                         2006年8月31日 8:32:46
         (Y) Year:                              {0:Y}                         2006年8月

注:在windows操作系统中,通过"控件面板"→"区域和语言选项"→"区域选项"→"标准和格式"设置不同的国家语言,会出现不同的显示效果。“英文(美国)”与“英文(英国)”的日期显示方式也有所不同。

posted @ 2006-08-31 16:48  希冀  阅读(335)  评论()    收藏  举报