关于time_t的问题,望高手指点 time_t是一个long型的,如果给你一个time_t,你怎么计算出时间呢?比如说time_t在内存中的数据为 83 19 FC 33 (注意是再内存中的数据),怎么计算得到他表示的时间呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 给你一个例子:time_t tm=CTime::GetCurrentTime().GetTime();CTime ctm=tm;CString str=ctm.Format("%Y%m%d%H%M%S")AfxMessageBox(str);//显示年月日时分秒 谢谢,可是我只要time_t的,我要自己运算他的时间。谁能告诉我他的结构呢? struct tm *localtime( const time_t *timer ); time_t ltime;struct tm *today;today=localtime( <ime );long time=(today->tm_hour)*10000+(today->tm_min)*100+today->tm_sec; long date=(today->tm_year+1900)*10000+(today->tm_mon+1)*100+today->tm_mday; 关CPropertySheet的问题.. Grid++Report - 专为VC程序员打造的报表构件 vs2005 picture控件显示png Directshow摄像头如何断开连接? 本人急需一份带背景图的ListView(不要象GfxList那种ListCtrl),请各位帮助 请问如何实现右键菜单获取选中的文件名! 一个新手的问题--关于PE File Format 一公司面试题,大家分享 求助:怎么在View类里调用对话框的按钮单击事件。 VS 编译的DLL在VS卸载后无法调用 请问,怎样进行分组(排序),然后在根据某个字段排序,怎么写这样的SQL! 各位兄长帮个忙了
time_t tm=CTime::GetCurrentTime().GetTime();
CTime ctm=tm;
CString str=ctm.Format("%Y%m%d%H%M%S")
AfxMessageBox(str);//显示年月日时分秒
struct tm *today;
today=localtime( <ime );
long time=(today->tm_hour)*10000+(today->tm_min)*100+today->tm_sec;
long date=(today->tm_year+1900)*10000+(today->tm_mon+1)*100+today->tm_mday;