How to generate Unix Time Stamp?

I want to generate Unix timestamp for my Data, how to generate it? I am not talking about Data and all i want it to be in unix format. for example for creationTime field, value shoudl be 1551274861828.

I have used epoch(now()), but it’s not giving desired result.

I have got my answer, hope this will be useful for others as well.

use formula as type for field and write this formula.

If you want to get till seconds, then type DateTime.now.strftime(’%s’), this will give 10 digit number.
If you want to get till milliseconds, then type DateTime.now.strftime(’%Q’), this will give 13 digit number.

1 Like