Skip to main content

DateNow

The DateNow function returns the current time. If a time zone is specified the function will return the current time for that specific time zone.

Prototype

    DateNow(DateType)

Arguments

    DateType      String      By value   

An empty or a valid string containing the selected time zone.

- Utc
- SFHub
- SFServer
- User

If not defined, the SFHub time zone will be applied.

Returns

    Date

The new Date represents the current time according to the DateType parameter.

Exception

    Undefined

Undefined is returned if DateType parameter is not a valid Date Type.

Example

    DateNow()

This will return 05/02/2022 0:0:0 (the current time of the SFHub server).

    DateNow('User')

This will return 05/01/2022 22:0:0 (the current time of the User).