i av a string like this 8/14/07 8:04:07 PM. i need to write the function for changing this into Tdatetime variable. What i did is, extract the Tdate and Ttime seperately and finally combined that. Here is the code.
Templist:= Tstringlist.Create;
Templist.Delimiter := #9;
Templist.DelimitedText:= '8/14/07 8:04:07 PM';
Dstr:= Templist[5];
Tstr:= Templist[6]+Templist[7];
Date:= Strtodate(Dstr);
Time:= Strtotime(Tstr);
Try
Result:= Int(Date) + Frac(Time) ;
the values of the templist[5],[6],[7] are given.
But the application is of used across the globe and i got the bug that this is not suitable all the regional setting for windows, and they asked me to set temporary Tformatsettings.
i am not able to know how to proceed. do anyone post suggestions in this matter?