Page 1 of 1

Date Time Formats

Posted: Fri Feb 01, 2019 1:16 am
by don lowenstein
Is a function available to create a date/time string in the following format? I'm not too sure about data to the right of "13:39" in the sample below.

"01/31/2019 15:39:52.233-05:00"

thanks in advance.

Re: Date Time Formats

Posted: Fri Feb 01, 2019 3:03 pm
by Rick Lipkin
Don

I don't know if this is what you are looking for ?

dtoc(date())+" "+Time()

The above may not carry out the time string that you may be looking for ..

Rick Lipkin

ps .. noticed you have an 816 area code .. I am a Kansas City native .. recognized the area code

Re: Date Time Formats

Posted: Fri Feb 01, 2019 7:01 pm
by don lowenstein
Thanks for the reply, RIck.

I will have to settle for the date() + time() for now.
yes - I'm in the KC area - Cameron Mo - north about 50 miles.

I see from the join dates to this forum we've both have been long time Fivewin supporters.

Don

Re: Date Time Formats

Posted: Fri Feb 01, 2019 7:38 pm
by nageswaragunupudi

Code: Select all

function somename
   local tDateTime := DateTime()

   ? TTOC( tDateTime ) + FW_TIMEZONE()
   // for India now 02-02-2019 01:06:20.369-05:30

return nil

function FW_TIMEZONE()

   local n  := -HB_UTCOFFSET()

return If( n < 0, "-", "+" ) + LEFT( SECTOTIME( ABS( n ) ), 5 )

 
Useful functions
HB_UTCOFFSET()
HB_TSTOUTC( tDateTime ) --> Current UTC Time

Re: Date Time Formats

Posted: Fri Feb 01, 2019 8:40 pm
by don lowenstein
Many Thanks.