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
6 replies
Subscribers
9 subscribers
Views
2802 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I am getting a Date from my xml using xpathsnippet funciton and it returns the d
aneeshv
over 12 years ago
I am getting a Date from my xml using xpathsnippet funciton and it returns the date as a TEXT field.
I want to convert it back to Date to insert it in the db.
todate() function does not seem to work for me since it returns an integer and not a date.
None of the other date functions take input as a text and give output as date..
Is there any such function?...
OriginalPostID-61770
OriginalPostID-61770
Discussion posts and replies are publicly visible
Parents
0
Annelise Dubrovsky
Appian Employee
over 12 years ago
Which Appian version are you using?
I'll find out if there is a more direct way to do this, but until then, this may help you out:
date(split(left(ri!dateText, 10), "-")[1], split(left(ri!dateText, 10), "-")[2], split(left(ri!dateText, 10), "-")[3])
It's simply dropping the time and timezone portions, splitting the remaining text into an array with three elements, and calling the date function on each piece.
I'd recommend putting the logic within a rule e.g. convertFromXmlDate().
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Annelise Dubrovsky
Appian Employee
over 12 years ago
Which Appian version are you using?
I'll find out if there is a more direct way to do this, but until then, this may help you out:
date(split(left(ri!dateText, 10), "-")[1], split(left(ri!dateText, 10), "-")[2], split(left(ri!dateText, 10), "-")[3])
It's simply dropping the time and timezone portions, splitting the remaining text into an array with three elements, and calling the date function on each piece.
I'd recommend putting the logic within a rule e.g. convertFromXmlDate().
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data