Count seconds between Epoch an now to get the Unix-timestamp:
toString(secondsBetween([%CurrentDateTime%], dateTime(1970,1,1)))
Dates before 1970: prefix with ‘-’
What`s your purpose? One possible way is to take the difference from a constant date like 01.01.001
The CommunityCommons module has a DateTimeToLong java action you could use.