From: Charles Tam on 9 Aug 2005 02:46 I've a function that format time to string (see below). How do I write a function that converts the formatted string back to time? Could you please include your example with syntax? CString convertTimeToString(const long input_time){ CString str_time; str_time.Format("%.3d:%.2d:%.2d.%.3d", input_time/3600000, (input_time%3600000)/60000, (input_time%60000)/1000, input_time%1000); return str_time;}
From: Atul on 9 Aug 2005 05:12 One way is to use COleDateTime::ParseDateTime, then use COleDateTime::GetAsSystemTime and create a CTime object from the SYSTEMTIME. -Atul, Sky Software http://www.ssware.com Shell MegaPack ActiveX & .Net Drop In Windows Explorer like Shell Browsing GUI controls for your app. "Charles Tam" <CharlesTam(a)discussions.microsoft.com> wrote in message news:F18C5F91-D876-4960-A206-F79613933683(a)microsoft.com... > I've a function that format time to string (see below). How do I write a > function that converts the formatted string back to time? Could you > please > include your example with syntax? > > CString convertTimeToString(const long input_time){ > CString str_time; > str_time.Format("%.3d:%.2d:%.2d.%.3d", > input_time/3600000, > (input_time%3600000)/60000, > (input_time%60000)/1000, > input_time%1000); > return str_time;}
From: Charles Tam on 9 Aug 2005 18:39 Would you be able to show me how I should use COleDateTime? "Atul" wrote: > One way is to use COleDateTime::ParseDateTime, then use > COleDateTime::GetAsSystemTime and create a CTime object from the SYSTEMTIME. > > -Atul, Sky Software http://www.ssware.com > Shell MegaPack ActiveX & .Net > Drop In Windows Explorer like Shell Browsing GUI controls for your app. > > > "Charles Tam" <CharlesTam(a)discussions.microsoft.com> wrote in message > news:F18C5F91-D876-4960-A206-F79613933683(a)microsoft.com... > > I've a function that format time to string (see below). How do I write a > > function that converts the formatted string back to time? Could you > > please > > include your example with syntax? > > > > CString convertTimeToString(const long input_time){ > > CString str_time; > > str_time.Format("%.3d:%.2d:%.2d.%.3d", > > input_time/3600000, > > (input_time%3600000)/60000, > > (input_time%60000)/1000, > > input_time%1000); > > return str_time;} > > >
|
Pages: 1 Prev: CFtpConnection::PutFile and ProgressBarCtrl Next: Webcam & createfile |