Unix Timestamp Playout

I receive a unix (epoch) timestamp as an integer in milliseconds from an API call. I cant figure out how to decipher the timestamp and just play the month, day and year as audio in a call flow.

Any help would be appreciated!!

Convert it to a datetime variable using ToAudioDateTime. There are a variety of formats to play a datetime. The closest one is Date, which would play "Wednesday August seventeenth twenty twenty two". If you don't want the day of week played, then you can play each piece separately like this.

image

Thank you very much Melissa!!!

The date is playing out incorrectly. When I run 1658368800000 through a converter I found on the internet and choose milliseconds, the date displays as 20 July 2022, which is correct. When I run it through the converter and choose seconds, it display August 13 54521 which is what I hear on the audio playout. Is there a way to specify "milliseconds" in the conversion?

Thanks again for your help!!!

No but you can divide by 1000. ToDateTime expects a value in seconds not milliseconds

Awesome, that works. Thank you for your help!!

I receive a unix (epoch) timestamp as an integer from an API call.
I can't figure out how to make an account to know the time difference between the current date and the sent unix timestamp.

Any help would be appreciated!!

You can get the current datetime using the GetCurrentDateTimeUtc function. You can convert the unix timestamp to a datetime variable using the ToDateTime function. Use the DateTimeDiff function to get the difference between the two values.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.