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
3 replies
Subscribers
7 subscribers
Views
2203 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I am needing some help with date field issues. I have a date field that I
marieh
over 9 years ago
I am needing some help with date field issues.
I have a date field that I am saving to the db as local(now()). Then when it gets pulled from the db it is one day in the past. Then when I display it with local or with out local it is two days in the past. I have even got rid of the local when saving to db and it still does the same thing. Does any one have any suggestions?
OriginalPostID-174405
OriginalPostID-174405
Discussion posts and replies are publicly visible
Parents
0
Christine Shen
A Score Level 1
over 9 years ago
I ran into a similar issue recently. I found if you save a datetime type in a date field, Appian will convert it into GMT by default. For example in EST, if you save 10/22/15 12 AM EST the result will be 10/22/15 8 PM. Therefore, I recommend wrapping a gmt() around your saveInto value.
Appian also by default writes dates in GMT (
forum.appian.com/.../Date_and_Time_Functions.html)
, so this causes another shift when you read from the database. I would suggest wrapping all your datetime reads from the database with a gmt() as well.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Christine Shen
A Score Level 1
over 9 years ago
I ran into a similar issue recently. I found if you save a datetime type in a date field, Appian will convert it into GMT by default. For example in EST, if you save 10/22/15 12 AM EST the result will be 10/22/15 8 PM. Therefore, I recommend wrapping a gmt() around your saveInto value.
Appian also by default writes dates in GMT (
forum.appian.com/.../Date_and_Time_Functions.html)
, so this causes another shift when you read from the database. I would suggest wrapping all your datetime reads from the database with a gmt() as well.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data