date to number

Is it possible to convert a DATETIME, to a unique number?
and vice versa?
unique number to a DATETIME?

Like in Filemaker you can do with date to number and number to date!

DateTime already is a unique number…

Use yourdatetime.getMilliseconds();

I don’t get it!

this does not work!
It always returns value: 417

:?:

field: setvervaldatum (DATETIME) dd-MM-yyyy
calculated field (INTEGER): return setvervaldatum.getMilliseconds();

With me, under os x I don’t get the same value like you but the value is very low and bouncing up and down instead of adding up…

In JavaScript this really is the function we need for this so I think there is something wrong here :?

HJK:
I don’t get it!

this does not work!
It always returns value: 417

:?:

field: setvervaldatum (DATETIME) dd-MM-yyyy
calculated field (INTEGER): return setvervaldatum.getMilliseconds();

Try this:

calculated field (INTEGER): return setvervaldatum.getTime()

returns: 1075449600000 (date: 01/30/2004 [MM/dd/yyyy])

Bob Cusick