dateTime()
Last updated 5/02/2024
The dateTime()
is a function on the Five
object used to return the current date and time in local time as a string.
info
When using the dateTime()
function on a table event the data type for the field must be DateTime.
Available
Client and Server
Function Signature
dateTime(): string;
Return Value
A string representing the local current date and time, formatted as yyyy-mm-dd hh:mm:ss.
Example Output
Output
console.log(five.dateTime()); // output '2022-08-30 03:25:00'