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
2140 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hi I have date which is in text format, sample date is "2013-04-02 00:00:00
Sumeet Khare
over 10 years ago
Hi I have date which is in text format, sample date is "2013-04-02 00:00:00.000". let me know how to convert it into date as todate & todateTime are not working on this format....
OriginalPostID-75223
OriginalPostID-75223
Discussion posts and replies are publicly visible
0
Sanjay
over 10 years ago
Did you try date()
forum.appian.com/.../Date_and_Time_Functions
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 10 years ago
For whatever reason, the ISO 8601 date format (YYYY-MM-DD) is not supported by the todate() function (or by the date picker); in your case you can try splitting the date and time apart using the split() function or similar, then following the previous commentor's suggestion, call the date() function after splitting the date portion on the dash ("-") character.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 10 years ago
I just wrote this example solution which utilizes the with() function to help handle the splitting. You can leave out the last little bit if you don't need the passed-in time at all.
with(
dt:split("2013-04-02 00:00:00.000"," "),
d:split(dt[1],"-"),
date(d[1],d[2],d[3])&" "&totime(dt[2])
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sumeet Khare
over 10 years ago
thanks to all
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel