分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

CTime/COleDateTime::Format方法的使用

CTime ct = CTime::GetCurrentTime();
CString str = ct.Format("%Y-%m_%d %H-%M-%S");
输出为:str="2006-04-23 15-21-30"
%a 
Abbreviated weekday name 
%A 
Full weekday name 
%b 
Abbreviated month name 
%B 
Full month name 
%c 
Date and time representation appropriate for locale 
%d 
Day of month as decimal number (01 – 31) 
%H 
Hour in 24-hour format (00 – 23) 
%I 
Hour in 12-hour format (01 – 12) 
%j 
Day of year as decimal number (001 – 366) 
%m 
Month as decimal number (01 – 12) 
%M 
Minute as decimal number (00 – 59) 
%p 
Current locale's A.M./P.M. indicator for 12-hour clock 
%S 
Second as decimal number (00 – 59) 
%U 
Week of year as decimal number, with Sunday as first day of week (00 – 53) 
%w 
Weekday as decimal number (0 – 6; Sunday is 0) 
%W 
Week of year as decimal number, with Monday as first day of week (00 – 53) 
%x 
Date representation for current locale 
%X 
Time representation for current locale 
%y 
Year without century, as decimal number (00 – 99) 
%Y 
Year with century, as decimal number 
%z, %Z 
Either the time-zone name or time zone abbreviation, depending on registry settings; no characters if time zone is unknown 
%% 
Percent sign
// Example for CTime::Format and CTime::FormatGmt
CTime t( 1999, 3, 19, 22, 15, 0 ); 
// 10:15 PM March 19, 1999
CString s = t.Format( "%A, %B %d, %Y" );
ATLASSERT( s == "Friday, March 19, 1999" );

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow

CTime/COleDateTime Format方法的使用相关推荐

  1. CTime/COleDateTime::Format方法的使用

    CTime/COleDateTime::Format方法的使用 CTime ct = CTime::GetCurrentTime(); CString str = ct.Format("%Y ...

  2. CTime COleDateTime的常用操作和比较

    CTime COleDateTime的常用操作和比较 1) 获取当前时间. CTime time; time = CTime::GetCurrentTime(); 2) 获取时间元素. int yea ...

  3. 如何在VC中加减日期及 CTime COleDateTime的常用操作和比较

    如何在VC中加减日期及 CTime COleDateTime的常用操作和比较 [转贴 2008-10-31 15:51:28]     字号:大 中 小 如何在VC中加减日期  使用CTime类,如: ...

  4. 如何在VC中加减日期及 CTime COleDateTime的常用操作

    如何在VC中加减日期  使用CTime类,如:     CTime t1( 1999, 3, 19, 22, 15, 0 ); // 10:15PM March 19, 1999     CTime ...

  5. COleDateTime ParseDateTime 方法

    COleDateTime   ParseDateTime 方法 很神奇 可以支持例如 "25 January 1996" "8:30:00" "20: ...

  6. String.Format()方法

    String.Format方法是我们在.Net应用开发时经常使用到的,它的灵活使用有时能够达到事半功倍的效果,下面我们就借用MSDN上的一个示例来向大家展示String.Format的各种用法. 该示 ...

  7. 实现Date函数属性中的format方法

    js中没有Date.format方法的,所以在date属性中加format方法 //js格式化属性 Date.prototype.format = function (format) { var o ...

  8. python基础语法手册format-Python-输出格式化format()方法的基本使用(2)

    本文章主要讲述Python中输出函数里格式化输出<.format()>的使用方法. 任何人可对专栏内容进行任意复制和转载,且无需注明文章作者,出处,来源. 接上次的继续讲,没看过的可以去看 ...

  9. String.format()方法使用说明

    2019独角兽企业重金招聘Python工程师标准>>> JDK1.5开始String类中提供了一个非常有用的方法String.format(String format, Object ...

最新文章

  1. (原)War3 脚本分析5-基础脚本资源
  2. BZOJ 4555 [Tjoi2016Heoi2016]求和
  3. 手机端input[type=date]的placeholder不起作用
  4. 转】未指定 INSTANCESHAREDWOWDIR 命令行值。如果指定INSTANCESHAREDDIR 值,则必须指定该值 ....
  5. 数字化技术浪潮下,医院临床科研如何「华丽变身」
  6. 第27月第24天 git pull fetch
  7. Django之Form插件
  8. C#-WebForm-文件上传-FileUpload控件
  9. 怎么样测试需要登录的接口?需要登录的接口怎么测试性能?
  10. linux象棋软件下载,一个中国象棋游戏
  11. invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix
  12. 非支配快速排序算法详解
  13. autojs之获取ip(内网ip和公网ip)
  14. Windows10商店安装Ubuntu 18.04 LTS
  15. Pytest的基本使用
  16. 数据库原理第二章测验(标黑的为答案)
  17. php(magento),magento在本地php7上安装方法
  18. nodejs zip 解压zip文件
  19. mysql表的导入和导出
  20. [下载]三维卫星云图显示系统V2.0

热门文章

  1. 激动人心!昨晚,这场盛会在青岛开幕!
  2. TDengine 在蓝深远望电机物联网监测预警与预测性维护平台中的应用
  3. 嗯,农民伯伯的2014就是这些
  4. 猜成语游戏c语言程序设计教程课后答案,猜成语的灯谜和答案
  5. 利用R ggplot2包进行数据可视化(一)
  6. php判断某年是不是闰年,PHP怎么判断一年是否为闰年?
  7. lis双工常见设置!
  8. 西门子300PLC连接组态王KingSCADA实现ModbusTCP通信
  9. windows安装JDK8教程
  10. Paul 叔纯正美式发音①~发音技巧(一):复数发音、咬舌音、咬唇音、t音变d音(r,s,th,t,f,v,sh)