Skip to main content
February 26, 2025
Question

Date time zone issue

  • February 26, 2025
  • 18 replies
  • 0 views

I have created a rule to display date time


how to resolve it ?

    18 replies

    mikes0011
    Brainy
    February 26, 2025

    todatetime() expects an input string formatted presumably in your given time zone's format.  if you changed your user locale but didn't update the formatting of the string you're passing it, then most likely it's now getting a string that it doesn't understand the formatting for.

    I can't give much more specific advice than that since you haven't included your actual code and haven't included the source for the date/time string you're trying to pass into "todatetime()", both of which are important for figuring out what you'd need to change here.

    March 3, 2025


    if(
    rule!P3_utils_checkIsNullOrEmpty(ri!dateTime),
    {},
    text(todatetime(ri!dateTime),cons!FORMAT_DATE_TIME),
    )

    ri!dateTime is anytype 
    cons!FORMAT_DATE_TIME - dd/mmm/yyyy hh:mm z

    here actually I am passing date as text. I am fetch it from json