Time and Date unix style

Hello

I am trying to generate a unique file name. A common way of doing this is to use time and date expressed (UNIX-style) as a string of numbers (which is unique). I tried using the built-in Lectora variables but they are written out in words. I need the more primitive unix rendition. Any advice?

Many thanks

Andrew

Discussion (1)

Use JS, Date.now() will return the Unix timestamp in all browsers starting with IE9 (IE8 fix here). To put it into a variable in Lectora, execute this:

var stamp = Date.now();

VarMyCustomVar1.set(stamp);

The "MyCustomVar1" has to be initialized on the page somewhere (e.g. used in an action or a condition) to be available for JS.

Discussions have been disabled for this post