Page 1 of 1

time with milliseconds

Posted: Sat Mar 14, 2020 1:48 pm
by don lowenstein
Does a function exist which returns the time with milliseconds?

Re: time with milliseconds

Posted: Sat Mar 14, 2020 3:28 pm
by nageswaragunupudi

Code: Select all

? DateTime() // --> 14-03-2020 20:56:20.355
 

Re: time with milliseconds

Posted: Sat Mar 14, 2020 3:50 pm
by nageswaragunupudi
Please keep this function:

Code: Select all

function TIME_MS()

#ifdef __XHARBOUR__
   local cTime := TTOC( DateTime(), 2 )
#else
   local cTime := HB_TTOC( HB_DateTime(), "", "HH:MM:SS:FFF" )
#endif

return cTime
 
? TIME_MS() will return a time string in format HH:MM:SS.CCC with milliseconds

Re: time with milliseconds

Posted: Sat Mar 14, 2020 10:48 pm
by don lowenstein
Many Thanks.