We are currently performing maintenance on Appian Community. As a result, discussions posts and replies are temporarily unavailable. We appreciate your patience.

Having difficulties displaying dates across different timezones. Used

Having difficulties displaying dates across different timezones.

Used 'usertimezone(pp!initiator)' to capture the initiator's timezone (stored in a text field).
When we display the dates in subsequent screens we use 'local (pv!datetime,timezone) This does not display the correct time.
Now store the dates as text - yes they display correctly, but now have a new problem.
We use the pv!date_time values for validation. If we hide the date_time fields validation fails, if we display date_time, validation works but we have confusion showing allt he dates.

How can we get one solution that will work?...

OriginalPostID-39381

OriginalPostID-39381

  Discussion posts and replies are publicly visible

Parents
  • I am attaching an example application that shows an approach you can use to meet this requirement. Let me explain this with the example:

    1. Create a date time field in the form so the user can introduce the desired date and time (you already have this)
    2. In that same form create an hidden input or a custom output to store the user time zone: usertimezone(pp!initiator)
    ---> The result will be stored in a process variable of type text. In my example the text variable is called initiatorTimeZone
    *** 3. In the form where you are going to display this information in the original time zone you need to configure the "Refresh default values every time the task form is viewed" in the "Other" tab of the User Input Task properties.
    5. In that same form create a date time field and use the following expression as the default value:

    =local(gmt(pv!myDateTime,usertimezone(loggedInUser())),pv!initiatorTimeZone)
Reply
  • I am attaching an example application that shows an approach you can use to meet this requirement. Let me explain this with the example:

    1. Create a date time field in the form so the user can introduce the desired date and time (you already have this)
    2. In that same form create an hidden input or a custom output to store the user time zone: usertimezone(pp!initiator)
    ---> The result will be stored in a process variable of type text. In my example the text variable is called initiatorTimeZone
    *** 3. In the form where you are going to display this information in the original time zone you need to configure the "Refresh default values every time the task form is viewed" in the "Other" tab of the User Input Task properties.
    5. In that same form create a date time field and use the following expression as the default value:

    =local(gmt(pv!myDateTime,usertimezone(loggedInUser())),pv!initiatorTimeZone)
Children
No Data