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
12 replies
Subscribers
8 subscribers
Views
7835 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Covert Time to UNIX Time
sahilb
over 8 years ago
I want to convert the time into UNIX Timestamp. Is it is possible in Appian to convert a time into UNIX Timestamp format?
Thanks in Advance
OriginalPostID-239475
Discussion posts and replies are publicly visible
Top Replies
chetany
over 8 years ago
+1
A Score Level 1
Here is a Expression rule that you may use to convert time to a UNIX timestamp. It makes use of the fact that the difference between two datetimes is an interval. I have used it to convert the current…
Parents
0
Eduardo Fuentes
Appian Employee
over 8 years ago
I went through the functions documentation
forum.appian.com/.../Appian_Functions.html
and didn't find a way to convert to a timestamp.
Maybe building a custom function that takes a date and time and returns the time stamp. Basically if you code your custom function to return a long, and you just simply return the date and time you're passing, since the product maps it to java.sql.Timestamp I think you'll get exactly what you need.
Example
@Function
public Long getLocalTime(ServiceContext sc, @Parameter Timestamp datetime) {
return datetime;
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Eduardo Fuentes
Appian Employee
over 8 years ago
I went through the functions documentation
forum.appian.com/.../Appian_Functions.html
and didn't find a way to convert to a timestamp.
Maybe building a custom function that takes a date and time and returns the time stamp. Basically if you code your custom function to return a long, and you just simply return the date and time you're passing, since the product maps it to java.sql.Timestamp I think you'll get exactly what you need.
Example
@Function
public Long getLocalTime(ServiceContext sc, @Parameter Timestamp datetime) {
return datetime;
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data