timestamp

timestamp ( ) : long

Get the timestamp in milliseconds

Note: be careful when handling timestamps, integers have an upper limit and you can't calculate with some numbers. Prefer long numbers:

formatDate("yyy/MM/dd", timestamp()-30*24*3600*1000) // strange result
formatDate("yyy/MM/dd", timestamp()-30L *24*3600*1000) // good result
formatDate("yyy/MM/dd", timestamp()-30L *24L*3600L*1000L) // good result also