Skip to main content
Known Participant
Feb 26, 2025 7:14 AM UTC
Question

Date time zone issue

I have created a rule to display date time


how to resolve it ?

    18 replies

    mikes0011
    Brainy
    Feb 26, 2025 4:15 PM UTC

    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.

    The Expression Guru
    Known Participant
    Mar 3, 2025 6:37 AM UTC


    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