toString function
- Arguments
- 0
- Return value (string)
- A string representing the date and time of the Date object.
- Syntax
dateObj.toString()- Examples
-
Example Result This script is added, as a custom script on an action, to any element with a Label property, such as a button. var d = new Date(); this.Label = d.toString();Assuming the current date is Feb 28, 2018, local time, returns ”Wed Feb 28 2018 13:45:55 GMT-0600 (Central Standard Time)”.
var x = new Date(); myVar = x.toString(); // assigns a value to myVar similar to: // Mon Sep 28 1998 14:36:22 GMT-0700 (PDT