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
+1
person also asked this
people also asked this
Replies
12 replies
Subscribers
6 subscribers
Views
8410 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
My requirement is to convert datetime data type to date and display it on datefi
vineeta6579
over 10 years ago
My requirement is to convert datetime data type to date and display it on datefield sail component. I am using below expression for the same.
todate(text(local!ThroughDate,"yyyy-mm-dd"))
i am able to convert it to date but its not displaying on the datefield component but when i replaced it with textfield it works.
Any pointer on this..
OriginalPostID-137613
OriginalPostID-137613
Discussion posts and replies are publicly visible
0
vidyasagarm
over 10 years ago
Try this : date(year(local!ThroughDate),month(local!ThroughDate),day(local!ThroughDate))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 10 years ago
I'm struggling to understand what you're trying to achieve....
1) If local!ThroughDate is a dateTime type then it doesn't need conversion to display in a SAIL dateTimeField it will work natively.
2) To convert a dateTime to a date you simply wrap it in todate(local!ThroughDate) so your text() function is further confusing things.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 10 years ago
In my case time component is coming as 7:00 PM and then its converting date to next date..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 10 years ago
@vidyasagarm i am getting below error with your suggested code.
Rule 'date' has 1 parameters, but instead passed 3 parameters.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 10 years ago
Attachment
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 10 years ago
You might want to check out this thread to ensure you understand why the SAIL component is amending the value and that you're not incorrectly altering your data:
forum.appian.com/.../e-137568
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vidyasagarm
over 10 years ago
Its working for me.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vineeta6579
over 10 years ago
i am working on 7.7 version. on which version you have tested it?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vidyasagarm
over 10 years ago
Same 7.7 version
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vidyasagarm
over 10 years ago
Date has 3 input parameters. Its very obivious, something wrong ouside the expression. Can you close the existing expression editor and try with new expression editor and see the output.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>