Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
7 subscribers
Views
4926 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
How to get date in user time zone? Also get absolute date and time ie today'
prasadr875
over 9 years ago
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
Top Replies
ajinkyab277
over 9 years ago
+1
Certified Lead Developer
Try below expression todate(tostring(now()))
0
ajinkyab277
Certified Lead Developer
over 9 years ago
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
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ajinkyab277
Certified Lead Developer
over 9 years ago
For second expression
gmt(todatetime(ri!date))
Make sure ri!date is of date type and not datetime
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
prasadr875
over 9 years ago
First question is about getting current date in user time zone not date and time
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ajinkyab277
Certified Lead Developer
over 9 years ago
Try below expression
todate(tostring(now()))
Cancel
Vote Up
+1
Vote Down
Sign in to reply
Verify Answer
Cancel