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
13 replies
Subscribers
8 subscribers
Views
4014 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I am trying to get the document creation date using below expression function.
Mahesh Sanga
over 10 years ago
I am trying to get the document creation date using below expression function.
documents(local!documentsList,"dateCreated"), It is returning me dates in "2014-09-03 06:45:46.0" format. I am trying to convert that into dd/MM/yyyy format using datetext function. what is the best way to convert the above date format into dd/MM/yyyy ?
i used datetext("2014-09-03","dd/MM/yyyy") to convert but it threw error saying "invalid parameters passed" even for datetext(tostring("2014-09-03"),"dd/MM/yyyy") .
My use case is to get the list of documents from a folder that were created before given date time.
...
OriginalPostID-128967
OriginalPostID-128967
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 10 years ago
When you say this is erroring out:
datetext("2014-09-03","dd/MM/yyyy")
is it failing when you use that exact syntax or when you do
datetext(documents(local!documentsList,"dateCreated"),"dd/MM/yyyy")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mahesh Sanga
over 10 years ago
failing for datetext("2014-09-03","dd/MM/yyyy")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
The datatext function takes a date or date time, not a string
forum.appian.com/.../Scripting_Functions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
Example:
=datetext(todate("09-03-2014"),"dd/MM/yyyy")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mahesh Sanga
over 10 years ago
but when I checked from the expression editor, The first argument type is "Any Type".
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
That's a typo in the Expression Editor, the up-to-date reference is the documentation
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mahesh Sanga
over 10 years ago
so, It is better to depend on the documentation rather than on the documentation available on the expression editor.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mahesh Sanga
over 10 years ago
Eduardo,
Is the date format "2014-09-03" wrong? for that input it is failing. not for "09-03-2014".
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
Yes, the year goes at the end for the todate()
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mahesh Sanga
over 10 years ago
The function documents(pv!mydocumentsList,"dateCreated"), returns dates in format "2014-09-03 06:45:46.0" so I want to convert that format, is there any other way?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>