+1
Respost

Access local timestamp or date

doug fa 12 anys actualitzat fa 12 anys 2
Is it possible to be able to capture the local date and time from the device? For instance, we are looking to create a favorite function that when an action is activated, we want to be able to put a time stamp along with the entry into the SQLite database. Is this possible?
+1
UPDATE:

In the default JS engine, you can use this JS function:

[eval:new Date().getTime();]

If you want to format it, you can use something like XDate or dateConverter to make it look pretty if you want to display it. I think dataConverter is in there by default as well. Ex. [eval: dateConverter('[datasource:news.[eval: [param:dataSourceIndex] + 1].pubDate]','mmmm dS yyyy') ]

Any converter will need to be added to your functions.html file.
Awesome. Thanks.