公告
财富商城
积分规则
提问
发文
2019-01-02 16:20发布
余生请多指教
How can I format a date as dd/mm/yyyy or mm/dd/yy ?
dd/mm/yyyy
mm/dd/yy
Like in VB format("dd/mm/yy",now)
format("dd/mm/yy",now)
How can I do this in C#?
In you can also write
DateTime aDate = new DateTime(); string s = aDate.ToShortDateString();
for a short notation
or
DateTime aDate = new DateTime(); string s = aDate.ToLongDateString();
for a long notation like "Sunday, Febuary 1, 2009".
Or take a look at MSDN for the possibities of .ToString("???");
最多设置5个标签!
In you can also write
for a short notation
or
for a long notation like "Sunday, Febuary 1, 2009".
Or take a look at MSDN for the possibities of .ToString("???");