02-05-2021 11:52 AM
Hello,
I’m trying to generate time in unix timestamp format. Is there a snap function which can perform this task?
Thanks,
Smit
02-05-2021 12:09 PM
Hi @smit66,
Yes you can convert datetime to unix timestamp with a Date Time Extractor snap.
First map the datetime in mapper:
Then use a Date Time Extractor snap:
Result:
02-05-2021 01:04 PM
Thank you for your quick response.
02-05-2021 12:46 PM
You can also do it more simply with this expression in a Mapper:
Math.floor(Date.now().getTime() / 1000)
02-05-2021 01:05 PM
Thanks for your response, I’m currently using this solution.