util.Datetime.getCurrentAsLocal()

util.Datetime.getCurrentAsLocal() returns current date and time as a DATETIME value in the local time zone.

Syntax

util.Datetime.getCurrentAsUTC()

Usage and examples

util.Datetime.getCurrentAsUTC() is an analogue to the CURRENT operator - it reads the date and time from the system clock returns them as a DATETIME value in the local time zone.

The returned result has the precision 5 - YEAR TO FRACTION.

example code #1

 

MAIN

  DEFINE local DATETIME YEAR TO FRACTION(5)

    LET local = util.Datetime.getCurrentAsLocal()

    DISPLAY "CURRENT", CURRENT

    DISPLAY "Current Local: ", local

  CALL fgl_getkey()

END MAIN

obtained results #1

example code #2

 

MAIN

  DEFINE utc, local DATETIME YEAR TO FRACTION(5)

    LET utc = util.Datetime.getCurrentAsUTC()

    DISPLAY "Current UTC: ", utc

    LET local = util.Datetime.getCurrentAsLocal()

    DISPLAY "Current Local: ", local

  CALL fgl_getkey()

END MAIN

obtained results #2

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.