C++boost获取当前日期时间中的日期和时间
2013-07-20 13:30
351 查看
date myDate;
myDate = from_undelimited_string("20131202");
cout << to_iso_string(myDate) << endl;
time_duration myTime;
myTime = duration_from_string("09:58");
time_duration myOtherTime;
myOtherTime = duration_from_string("09:10");
cout << myTime.minutes() - myOtherTime.minutes() << endl;
ptime myPTime3 = second_clock::local_time(); //获取当前时间比如:20130716T164620
date myDate = day_clock::local_day(); //获取当前日期比如:20130716
cout << to_iso_string(myDate) << endl;;
myDate = from_undelimited_string("20131202");
cout << to_iso_string(myDate) << endl;
time_duration myTime;
myTime = duration_from_string("09:58");
time_duration myOtherTime;
myOtherTime = duration_from_string("09:10");
cout << myTime.minutes() - myOtherTime.minutes() << endl;
ptime myPTime3 = second_clock::local_time(); //获取当前时间比如:20130716T164620
date myDate = day_clock::local_day(); //获取当前日期比如:20130716
cout << to_iso_string(myDate) << endl;;
相关文章推荐
- C++获取当前日期时间的方法
- linux C++ 获取当前日期时间
- boost 获取当前日期和时间
- c++ 获取当前时间,当前日期
- C++ 获取当前日期时间 毫秒级
- C/C++获取当前系统时间
- Js获取当前日期时间及其它操作
- Js获取当前日期时间及其它操作
- 【转】Js获取当前日期时间及其它操作
- c#获取当前日期时间(转)
- JS获取当前日期时间/JS日期转化为unix时间戳
- Smarty 获取当前日期时间和格式化日期时间
- C/C++获取当前系统时间
- QTime获取当前时间,QDateTime获取日期和时间,QTimer定时器,QLCDNumber数码显示框
- js获取当前时间戳与日期比较
- Js获取当前日期时间及其它操作
- P_005.Python获取并输出当前日期时间
- shell 获取当前日期,当前时间
- 自动获取页面当前日期时间 http://www.datejs.com/
- Js获取当前日期时间及格式化操作