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
1504 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
We have observed a typical behavior, can someone let us know why this is happeni
nikhilh0001
over 10 years ago
We have observed a typical behavior, can someone let us know why this is happening:
SystemLocale set to EST New York. System Local is set to override user values which are set to No Preference.
Now check this expression: string(now()) --> this gives value of the current time in EST.
Now check this expression: todatetime(string(now())) --> this subtracts 5 hours from the current time to show earlier date time.
Can someone pl explain why such behavior is observed?...
OriginalPostID-102378
OriginalPostID-102378
Discussion posts and replies are publicly visible
0
nikhilh0001
over 10 years ago
is there any way to set the date format as MM/DD/YYYY instead of M/DD/YYYY
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
apatil
over 10 years ago
Nikhil - you can use the 'datetext( value, format )' inbuilt function (as of version 7.4) to set the date format.
Regarding the behavior mentioned in the original post, I'm not sure. but can look for it and share my findings, later
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Michael Tan
Appian Employee
over 10 years ago
You can achieve your date format by using text(pv!dateVariable, "mm/dd/yyyy")
I'm not sure why you are converting a date time to a string and back to a date time. A reminder regarding the use of todatetime() is tthe system assumes the timestamp defined in the string is GMT; therefore, when displaying the value it will be offset by your system time zone. This accounts for your five hour difference.
If you must proceed with todatetime(string(now())), you can wrap that with gmt(). This will store the GMT value, but will be adjusted for display to match the time zone your system is set to.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel