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
8 replies
Subscribers
7 subscribers
Views
2988 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi All, I have a question regarding datetext function...If I supply a
aswinb
over 11 years ago
Hi All,
I have a question regarding datetext function...If I supply a list of dates such as 5/31/2014, 5/31/2014, 6/1/2014...it would only display the formats for the month of May. It ignores the 6th month which is the last value supplied. Basically it swallows the last value and doesn't give output for it. Anybody knows how to solve this problem?...
OriginalPostID-106741
OriginalPostID-106741
Discussion posts and replies are publicly visible
0
jesse.triplett
Appian Employee
over 11 years ago
Two things to check--
1) Are you just testing in the expression editor? I've experienced multiple date inputs have the last date dropped before, so I would retest it with your real data.
2) If the 6th month is being displayed as the 5th month, check your user preferred calendar. Depending on whre the date is read from it may be converted to/from GMT and the hour shift may be placing 6/1 as 5/31
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aswinb
over 11 years ago
No it is dropping off 6th month...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aswinb
over 11 years ago
sorry disregard my comment above...its converting 6/1 to 5/31...i didn't understand what you meant by user preferred calendar?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aswinb
over 11 years ago
my working calendar is UTC-5:00 Eastern Time(America/New_York)....so that shouldn't do anything to it....
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jesse.triplett
Appian Employee
over 11 years ago
The default time of a date is right on the line of midnight. It sounds like it is taking in 6/1 12:00am and subtracts 5 hours to reach 5/31 7pm. Try something like datetext(gmt(ri!myDate),.... )
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Adam Glaser
Appian Employee
over 11 years ago
Jesse is correct and the workaround he provides (datetext(gmt(ri!date),"MMM dd yy")) is the correct one. This is a known issue in the product at this time.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aswinb
over 11 years ago
If i enclose the dates inside gmt function i am getting the following output: 000/2014, 000/2014,....etc
This is the code:
local!monthYears: apply(fn!datetext, apply(fn!gmt, local!list), "mmm/yyyy")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aswinb
over 11 years ago
The function text gets me the perfect output...thanks to jesse..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel