habibb
asked on
Proper date and time formate
Hope every expert will be fine.
i want to get current date and time in the formate like this 04/15/2002 05:25:45 PM or 04/15/2002 05:25:45
tell me simple way because I am new in VC++.
waiting for Good from all experts.
Thanks
i want to get current date and time in the formate like this 04/15/2002 05:25:45 PM or 04/15/2002 05:25:45
tell me simple way because I am new in VC++.
waiting for Good from all experts.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Are you sure you want it to be formatted that way?
Doesn't the user of your program expect the format to correspond with his regional settings?
If yes, then just use the most simple form of Format():
COleDateTime odt = COleDateTime::GetCurrentTi
CString strNow = odt.Format();
Bye.