time with milliseconds

time with milliseconds

Postby don lowenstein » Sat Mar 14, 2020 1:48 pm

Does a function exist which returns the time with milliseconds?
Don Lowenstein
www.laapc.com
User avatar
don lowenstein
 
Posts: 197
Joined: Mon Oct 17, 2005 9:09 pm

Re: time with milliseconds

Postby nageswaragunupudi » Sat Mar 14, 2020 3:28 pm

Code: Select all  Expand view

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

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

Re: time with milliseconds

Postby nageswaragunupudi » Sat Mar 14, 2020 3:50 pm

Please keep this function:
Code: Select all  Expand view
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
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: time with milliseconds

Postby don lowenstein » Sat Mar 14, 2020 10:48 pm

Many Thanks.
Don Lowenstein
www.laapc.com
User avatar
don lowenstein
 
Posts: 197
Joined: Mon Oct 17, 2005 9:09 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 99 guests