Converting String to Time

Tech-Archive recommends: Speed Up your PC by fixing your registry



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;}
.



Relevant Pages

  • Re: Converting String to Time
    ... "Atul" wrote: ... > Shell MegaPack ActiveX & .Net ... >> I've a function that format time to string. ... >> function that converts the formatted string back to time? ...
    (microsoft.public.vc.mfc)
  • Re: Reentrancy issue
    ... I am using a small singleton class called ResManager to handle my resources in MFC. ... the formatted string is not good. ... You are trying to hold 3 different strings in one CString variable, ...
    (microsoft.public.vc.mfc)