Skip to main content
March 12, 2024
Solved

Compare Now() to fixed time in EST, EDT Timezone

  • March 12, 2024
  • 4 replies
  • 0 views

I want to compare now() to 11:30 AM EST/EDT but it's always converted to GMT.

our time zone already changed EST/EDT

any suggestion?

Thanks,

Ken

Best answer by mathieud0001

a!localVariables(
  local!now: now(),
  local!nowLocal: local(local!now),
  local!toTimeNowLocal: totime(local!nowLocal),
  local!1130: totime("11:30 PM"),
  local!1130 = local!toTimeNowLocal
)

4 replies

davidj137213
Brainy
March 12, 2024
kend0001Author
March 12, 2024

function Now() already show the correct date & time with converted timezone.

I just want to compare the current time with 11:30 AM.

when I use totime(now()) is show as GMT time not the EST/EDT time

for example : now() = 3/12/2024 3:37 PM EDT(Date and Time with Timezone) 

but   totime(now()) =7:37 PM(Time)

and I cannot compare to 11:30 AM

      stefanhelzle0001
      Brainy
      March 12, 2024

      Keep in mind that the date&time displayed to you is always transformed into the timezone of your account. That makes your undertaking quite mind-bending. I covered working date&time in Appian in a blog post

      https://appian.rocks/2023/02/13/working-with-time-in-appian/