Discussion posts and replies are publicly visible
Since a Unix timestamp is the number of seconds from 01/01/1970 till now, you can try something like this:
(1651670870 / 86400) + datetime(1970, 01, 01, 00, 00)
I was going to suggest the intervalds() function, but upon testing it appears to not like large values for seconds.
That said, the seconds() function appears to work here, too, if it helps anyone simplify things slightly.
datetime(1970, 1, 1, 00, 00) + second() * 1651670870
Edit to add: I never realized there's an addSeconds() function too. Maybe it's newer? (edit: it's from a plug-in, thanks Richard)
addseconds(datetime(1970, 1, 1, 00, 00), 1651670870)
sure "addSeconds() " is an official appian function and no plugin function?Edit: aaah found it: https://community.appian.com/b/appmarket/posts/date-and-time-utilities
Good point, I didn't check that far. That's probably why I didn't recognize it (my dev environment is one i inherited with a bunch of plug-ins already installed which I didn't vet myself).
I was also looking for that function tbh although I haven't used it before.
And I was wondering how is possible that there isn't available a basic function like this so far.
Regarding the conversion, the ePoch timestamp to Appian dateTime conversion is not so accurate. If you check the minutes on the hour are not the same as the current hour.
The conversion to date is fine but if you need the response date to be precise, then you need a different formula.
PS. this is a nice to have function from Appian.
Edit. there is a function: fromUnixTimestamp() but the result is the same as the solution we gave so far.