Skip to Content
Author's profile photo Former Member

How to display current timezone

Purpose

Extract timezone from the result of built-in function CurrentTime().


Issue

Here below formula syntax doesn’t work:

Right(CurrentTime();10)


Error returned is the following: “The expression or sub-expression at position N in the ‘Right’ function uses an invalid data type. (IES 10037)”


Solution

Work around found consists in encapsulating the CurrentTime() function in an user-defined variable and update syntax as:

Right([MyTime];10)

where:

MyTime = CurrentTime()

Assigned tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Sébastien Konaté,Sébastien Konaté

      Try the following,

      FormatDate(Currentdate();"z")

      or

      FormatDate(Currentdate();"FULL_DATE_TIME")

      This is will give you the Time Zone information.

      I would not suggest to extract the timezone from "Right([MyTime];10)" because for few locale's timezone will not be displayed by default in the function. Ex - en_AU.