Add different Time Zone set up

I am having requirement to give the user a report with different time zone filter to search for the report.

The design I am thinking is to add column in database with different time zone column and user elect the time zone and call the query from that column.

Can anyone suggest the way to save the time from one column to another with different time zone

  Discussion posts and replies are publicly visible

Parents
  • Can you expand on your use case a little - are you giving the user a datetime range to enter say, yesterday @ 10 AM to today @ 10 AM, then filtering records where a dateime field lands in that range for the selected timezone?  Or otherwise?

    I'm not sure yet that additional fields in a SQL view would be the answer, but further thinking will depend on the use case.  In SQL you can always apply the DATEADD() function to shift a field's timezone, but it might be more appropriate to apply the shift in Appian something like:

    a!queryFilter(
      field: "dateTimeField",
      operator: "between",
      value: {
        ri!startDateTime+ri!timezoneOffset,
        ri!endDateTime+ri!timezoneOffset
      }
    )

Reply
  • Can you expand on your use case a little - are you giving the user a datetime range to enter say, yesterday @ 10 AM to today @ 10 AM, then filtering records where a dateime field lands in that range for the selected timezone?  Or otherwise?

    I'm not sure yet that additional fields in a SQL view would be the answer, but further thinking will depend on the use case.  In SQL you can always apply the DATEADD() function to shift a field's timezone, but it might be more appropriate to apply the shift in Appian something like:

    a!queryFilter(
      field: "dateTimeField",
      operator: "between",
      value: {
        ri!startDateTime+ri!timezoneOffset,
        ri!endDateTime+ri!timezoneOffset
      }
    )

Children
No Data