关于时间的显示 请问如何将时间值按照windows系统中设置的长时间格式输出显示?例如今天是2004年6月17日,系统中设置的长时间格式为yyyy'年'mm'月'dd'日',在程序中的edit控件中显示为:2004年6月17日 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 CTime test;test=CTime::GetCurrentTime();CString sTest;sTest=test.Format("%Y年%m月%d日 %H:%M:%S"); COleDateTime time; int h=time.GetCurrentTime().GetYear(); int m=time.GetCurrentTime().Month(); int s=time.GetCurrentTime().Day(); CString str; str.Format("%4d:%3d:%2d",h,m,s); GetDlgItem(IDC_EDIT2)->SetWindowText(str); CString str;SYSTEMTIEM st;GetSystermTime(&st);str.Format("%4d年%2d月%2d日", st.wYear, st.wMonth, st.wDay);GetDlgItem(IDC_YOUREDIT) ->SetWindowText(str); 楼上的各位没有明白我的意思,我希望输出格式能随着用户在控制面板中作出的改变而改变。即用户将系统的long date format从yyyy'年'mm'月'dd'日'改为yyyy mm dd,我的显示也自动从“2004年6月17日”改为“2004 6 17”。继续up! C语言实例求解 请高手解决局域网所有snmp代理的发现问题 郁闷的问题? 如何实现HTTP上传文件,server 端用asp 或jsp或其他服务器脚本接收的那种. VC中,INT型如何转化为字符串?? 蠢材求问 有没有哪位有NTFS文件系统编程的资料? ListBox控件的问题 ..::.. 非技术话题:程序员朋友们,你为什么不回家过年? ..::.. 如何从COleDateTime转为CTime,盼答 100分!!!!!!!实在是迷惑,请问msado15.dll这东西怎么用? 莫名其妙: m_pParentWnd这是那个类中的成员?
test=CTime::GetCurrentTime();
CString sTest;
sTest=test.Format("%Y年%m月%d日 %H:%M:%S");
int m=time.GetCurrentTime().Month();
int s=time.GetCurrentTime().Day();
CString str;
str.Format("%4d:%3d:%2d",h,m,s);
GetDlgItem(IDC_EDIT2)->SetWindowText(str);
SYSTEMTIEM st;
GetSystermTime(&st);
str.Format("%4d年%2d月%2d日", st.wYear, st.wMonth, st.wDay);
GetDlgItem(IDC_YOUREDIT) ->SetWindowText(str);