time with milliseconds

Post Reply
User avatar
don lowenstein
Posts: 196
Joined: Mon Oct 17, 2005 9:09 pm
Contact:

time with milliseconds

Post by don lowenstein »

Does a function exist which returns the time with milliseconds?
Don Lowenstein
www.laapc.com
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: time with milliseconds

Post by nageswaragunupudi »

Code: Select all

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: time with milliseconds

Post 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
Regards

G. N. Rao.
Hyderabad, India
User avatar
don lowenstein
Posts: 196
Joined: Mon Oct 17, 2005 9:09 pm
Contact:

Re: time with milliseconds

Post by don lowenstein »

Many Thanks.
Don Lowenstein
www.laapc.com
Post Reply