zoukankan      html  css  js  c++  java
  • [String.Format(转换时间格式)]

             string.Format("{0:d}", System.DateTime.Now);        // 2017/6/2;

             string.Format("{0:D}", System.DateTime.Now);      // 2017年6月2日;

             string.Format("{0:f}", System.DateTime.Now);       //2017年6月2日 14:09;

             string.Format("{0:F}", System.DateTime.Now);       //2017年6月2日 14:09:36;

             string.Format("{0:g}", System.DateTime.Now);       //2017/6/2 14:09;

             string.Format("{0:G}", System.DateTime.Now);      // 2017/6/2 14:09:36;

             string.Format("{0:M}", System.DateTime.Now);       //6月2日;

             string.Format("{0:R}", System.DateTime.Now);      // Fri, 02 Jun 2017 14:09:36 GMT;

             string.Format("{0:s}", System.DateTime.Now);       //2017-06-02T14:09:36;

             string.Format("{0:t}", System.DateTime.Now);       //14:09;

             string.Format("{0:T}", System.DateTime.Now);       //14:09:36;

             string.Format("{0:u}", System.DateTime.Now);       //2017-06-02 14:09:36Z;

             string.Format("{0:U}", System.DateTime.Now);       //2017年6月2日 6:09:36;

             string.Format("{0:Y}", System.DateTime.Now);       //2017年6月;

             string.Format("{0}", System.DateTime.Now);      // 2017/6/2 14:09:36;


          string.Format("{0:yyyyMMddHHmmssffff}", System.DateTime.Now);        //201706021409364497;

        以此类推......










     

  • 相关阅读:
    C指针详解(经典,非常详细)
    PL/SQL错误提示 database character set(AL32UTF8) and Client character set(ZHS16GBK) are different
    安装Oracle报错,全部为未知!
    Oracle 支持在具有 DHCP 分配的 IP 地址的系统上进行安装
    Asp.Net页面生命周期
    oracle 导库建立测试库
    宝塔安装建站教程
    SEM理论
    SEM小总结
    SEM大致操作梳理
  • 原文地址:https://www.cnblogs.com/shaopang/p/6933120.html
Copyright © 2011-2022 走看看