CTime/COleDateTime Format方法的使用
分享一下我老师大神的人工智能教程!零基础,通俗易懂!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方法的使用相关推荐
- CTime/COleDateTime::Format方法的使用
CTime/COleDateTime::Format方法的使用 CTime ct = CTime::GetCurrentTime(); CString str = ct.Format("%Y ...
- CTime COleDateTime的常用操作和比较
CTime COleDateTime的常用操作和比较 1) 获取当前时间. CTime time; time = CTime::GetCurrentTime(); 2) 获取时间元素. int yea ...
- 如何在VC中加减日期及 CTime COleDateTime的常用操作和比较
如何在VC中加减日期及 CTime COleDateTime的常用操作和比较 [转贴 2008-10-31 15:51:28] 字号:大 中 小 如何在VC中加减日期 使用CTime类,如: ...
- 如何在VC中加减日期及 CTime COleDateTime的常用操作
如何在VC中加减日期 使用CTime类,如: CTime t1( 1999, 3, 19, 22, 15, 0 ); // 10:15PM March 19, 1999 CTime ...
- COleDateTime ParseDateTime 方法
COleDateTime ParseDateTime 方法 很神奇 可以支持例如 "25 January 1996" "8:30:00" "20: ...
- String.Format()方法
String.Format方法是我们在.Net应用开发时经常使用到的,它的灵活使用有时能够达到事半功倍的效果,下面我们就借用MSDN上的一个示例来向大家展示String.Format的各种用法. 该示 ...
- 实现Date函数属性中的format方法
js中没有Date.format方法的,所以在date属性中加format方法 //js格式化属性 Date.prototype.format = function (format) { var o ...
- python基础语法手册format-Python-输出格式化format()方法的基本使用(2)
本文章主要讲述Python中输出函数里格式化输出<.format()>的使用方法. 任何人可对专栏内容进行任意复制和转载,且无需注明文章作者,出处,来源. 接上次的继续讲,没看过的可以去看 ...
- String.format()方法使用说明
2019独角兽企业重金招聘Python工程师标准>>> JDK1.5开始String类中提供了一个非常有用的方法String.format(String format, Object ...
最新文章
- (原)War3 脚本分析5-基础脚本资源
- BZOJ 4555 [Tjoi2016Heoi2016]求和
- 手机端input[type=date]的placeholder不起作用
- 转】未指定 INSTANCESHAREDWOWDIR 命令行值。如果指定INSTANCESHAREDDIR 值,则必须指定该值 ....
- 数字化技术浪潮下,医院临床科研如何「华丽变身」
- 第27月第24天 git pull fetch
- Django之Form插件
- C#-WebForm-文件上传-FileUpload控件
- 怎么样测试需要登录的接口?需要登录的接口怎么测试性能?
- linux象棋软件下载,一个中国象棋游戏
- invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix
- 非支配快速排序算法详解
- autojs之获取ip(内网ip和公网ip)
- Windows10商店安装Ubuntu 18.04 LTS
- Pytest的基本使用
- 数据库原理第二章测验(标黑的为答案)
- php(magento),magento在本地php7上安装方法
- nodejs zip 解压zip文件
- mysql表的导入和导出
- [下载]三维卫星云图显示系统V2.0