zoukankan      html  css  js  c++  java
  • asp.net 各种格式的时间格式

       //2011年10月31日

            this.Label6.Text = System.DateTime.Now.ToString("D");

            //2011-10-31

            this.Label7.Text = System.DateTime.Now.ToString("d");

            //2011年10月31日 16:10:15

            this.Label8.Text = System.DateTime.Now.ToString("F");

            //2011年10月31日 16:10

            this.Label9.Text = System.DateTime.Now.ToString("f");

            //2011-10-31 16:10:15

            this.Label10.Text = System.DateTime.Now.ToString("G");

            //2011-10-31 16:10

            this.Label11.Text = System.DateTime.Now.ToString("g");

            //16:10:15

            this.Label12.Text = System.DateTime.Now.ToString("T");

            //16:10

            this.Label13.Text = System.DateTime.Now.ToString("t");

            //2011年10月31日 8:10:15

            this.Label110.Text = System.DateTime.Now.ToString("U");

            //2011-10-31 16:10:15Z

            this.Label15.Text = System.DateTime.Now.ToString("u");

            //10月31日

            this.Label16.Text = System.DateTime.Now.ToString("m");

            this.Label16.Text = System.DateTime.Now.ToString("M");

            //Tue, 31 Apr 2011 16:10:15 GMT

            this.Label17.Text = System.DateTime.Now.ToString("r");

            this.Label17.Text = System.DateTime.Now.ToString("R");

            //2011年10月

            this.Label19.Text = System.DateTime.Now.ToString("y");

            this.Label19.Text = System.DateTime.Now.ToString("Y");

            //2011-10-31T15:52:19.1562500+08:00

            this.Label20.Text = System.DateTime.Now.ToString("o");

            this.Label20.Text = System.DateTime.Now.ToString("O");

            //2011-10-31T16:10:15

            this.Label18.Text = System.DateTime.Now.ToString("s");

            //2011-10-31 15:52:19

            this.Label21.Text = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");

            //2011年10月31 15时56分108秒

            this.Label22.Text = System.DateTime.Now.ToString("yyyy年MM月dd HH时mm分ss秒");

            //星期二, 四月 31 2011

            this.Label1.Text = System.DateTime.Now.ToString("dddd, MMMM dd yyyy");

            //二, 四月 31 '11

            this.Label2.Text = System.DateTime.Now.ToString("ddd, MMM d \"'\"yy");

            //星期二, 四月 31

            this.Label3.Text = System.DateTime.Now.ToString("dddd, MMMM dd");

            //10-11

            this.Label10.Text = System.DateTime.Now.ToString("M/yy");

            //31-10-11

            this.Label5.Text = System.DateTime.Now.ToString("dd-MM-yy");

  • 相关阅读:
    NTP on FreeBSD 12.1
    Set proxy server on FreeBSD 12.1
    win32 disk imager使用后u盘容量恢复
    How to install Google Chrome Browser on Kali Linux
    Set NTP Service and timezone on Kali Linux
    Set static IP address and DNS on FreeBSD
    github博客标题显示不了可能是标题包含 特殊符号比如 : (冒号)
    server certificate verification failed. CAfile: none CRLfile: none
    删除文件和目录(彻底的)
    如何在Curl中使用Socks5代理
  • 原文地址:https://www.cnblogs.com/wifi/p/2231844.html
Copyright © 2011-2022 走看看