[IGN-8635]Convert UTC timestamp to readable date

while this works, i wish it could be formatted. i'm not getting a time out of this. :frowning: but it's working and that's good enough to move the project along.

Once you have the date from toDate() you should be able to format it with dateFormat() as desired.

32-bit floating point doesn't have enough resolution for unix timestamps, much less millisecond timestamps.

1 Like

oh, right! so, can it be cast to Int64?

Try parsing with toLong(). But you might have to cut at the decimal for that to work. If you want to preserve the fraction, you'll need to parse with BigDecimal, multiply by 1000 in that form, then convert to Long. BigDecimal is not exposed in the expression language, so you are back to runScript or my objectScript.

1 Like

i can shift the decimals at the source and drop the remaining. that will streamline things and also drop the need to multiply by 1000. thanks @pturmel. your deep knowledge, once again, make the minutia work. i'm glad this got added to the 'stuff we need' docket.

2 Likes