HotRod40
asked on
Date Formatting
I have written a program in Visual C++ that has a DateTimePicker and a button.
When I click the button In want the date that has been selected in the DTPicker to
be shown in a message box in the format of dd/mm/yy.
I am new to VC++ and any help would be greatly appreciated.
Thanks
When I click the button In want the date that has been selected in the DTPicker to
be shown in a message box in the format of dd/mm/yy.
I am new to VC++ and any help would be greatly appreciated.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Anyway, if HotRod40 wants it in the specific format dd/mm/yy the method shown by AlexFM is one way to do it.
However, be aware that if your program is to be locale dependent you should NOT use that format. In that case the format should probably be "according to locale" and so you should rather use whatever format the locale tells you to use. MFC has functions to automatically format a time "according to locale" and you should most probably use those functions instead.
Alf
However, be aware that if your program is to be locale dependent you should NOT use that format. In that case the format should probably be "according to locale" and so you should rather use whatever format the locale tells you to use. MFC has functions to automatically format a time "according to locale" and you should most probably use those functions instead.
Alf
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split points between Salte & AlexFM
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Tinchos
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
Split points between Salte & AlexFM
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Tinchos
EE Cleanup Volunteer
brian