How to get date in user time zone? Also get absolute date and time ie today'

How to get date in user time zone? Also get absolute date and time ie today's date in user time zone with time 00:00:00?

OriginalPostID-152914

OriginalPostID-152914

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Hi Prasad

    Answer to your first question (How to get date in user time zone)
    1. If you are looking for current date and time now() function always returns time base on logged in users time zone
    2. But if you want to explicitly convert date in users time zone you can use below expression
    =local(ri!date,usertimezone(ri!user))

    Answer to your second question (date with 0 time offset)
    gmt(todatetime(ri!date))

    Thanks
    Ajinkya
Reply
  • 0
    Certified Lead Developer
    Hi Prasad

    Answer to your first question (How to get date in user time zone)
    1. If you are looking for current date and time now() function always returns time base on logged in users time zone
    2. But if you want to explicitly convert date in users time zone you can use below expression
    =local(ri!date,usertimezone(ri!user))

    Answer to your second question (date with 0 time offset)
    gmt(todatetime(ri!date))

    Thanks
    Ajinkya
Children
No Data