unix epoch

How to store time

Here is an example of how to store the Unix Epoch time for any number of reasons:

storeEval | new Date().getTime(); | currentTime

You can you this to:

  • Time page loads
  • Get a unique non-repeatable number (unique ID)
  • Get the current time

Another example for use with a formatted date:

storeEval | var d=new Date(); ((d.getMonth()+1))+'-'+d.getDate()+'-'+d.getFullYear(); | formattedDate

Will return: MM-DD-YYYY

Another example showing date and time: