Date time zone issue

I have created a rule to display date time



and currently my loacale of my profile is English (united states)
I changed it to english (united kingdom) and now it is giving me this error
Any idea why ?

how to resolve it ?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    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.


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

    cons!QST_FORMAT_DATE_TIME - dd/mmm/yyyy hh:mm z

    datetime variable is any type.

    and the main thing is we are passing date as text. We are fetching it from JSON.

Reply Children