Trying to get a Cstring converted to a Ctime. I recieve the CString in the following format....
12:00pm or 23:00
Lauren
-----------------** -- Posted from CodeGuru -- **-----------------
http://www.codeguru.com/ The website for Visual C++ programmers.
CTime time(1999, 5, 21, atoi(sHour), atoi(sMinute), 0);
Lauren,
I think you can use COleDateTime::ParseDateTime to convert the string
to a COleDateTime, then use COleDateTime::GetAsSystemTime to convert
to a SYSTEMTIME. Finally you can construct a CTime object from the
SYSTEMTIME.
Dave
----
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.
Lauren King wrote:
> Hi:
>
> Trying to get a Cstring converted to a Ctime. I recieve the CString in the following format....
> 12:00pm or 23:00
>