parseInteger(formatDateTime([%CurrentDateTime%],'ddMMyyyy'))
Take a look at the dateTimeToEpoch function. This will give you the number of milliseconds since January 1st 00:00:00 GMT.
https://docs.mendix.com/refguide/parse-and-format-date-function-calls#6-datetimetoepoch