09-27-2017 02:15 AM
Any idea how to obtain seconds, minutes, or hours between 2 timestamp?
Solved! Go to Solution.
09-27-2017 05:19 PM
In the above example just dont use the quotes, instead send as JSON object!! Otherwise you will get the warning from the platform at runtime.
Date.now().toLocaleDateString({“timeZone”:“PST”, “format”:“yyyy-MM-dd”})
09-27-2017 01:51 PM
thx, that works. On the similar note, anyway to get PST datetime with the Date.now() function?
09-27-2017 02:03 PM
In the documentation, there is this example:
Creating and Formatting a Date in a Specific Timezone
Expression:
Date.now().toLocaleDateString(‘{"timeZone":"PST", “format”:“yyyy-MM-dd”}’)
Description: The expression will create the current date time in the PST timezone and format its output into a string in the form of yyyy-MM-dd.
09-27-2017 05:19 PM
In the above example just dont use the quotes, instead send as JSON object!! Otherwise you will get the warning from the platform at runtime.
Date.now().toLocaleDateString({“timeZone”:“PST”, “format”:“yyyy-MM-dd”})
11-30-2017 05:02 AM
Can anyone help me to fix, datatype issue during date format conversion?
Date.parse($GTA_DATE_LAST_CHG.toString()).toLocaleDateTimeString({“format”:“dd/MM/YYYY HH:mm:ss”})
It gives result result 11/11/2009 17:03:37 but which has string datatype. But while loading into target facing an data type issue.
Instead of string datatype I need to convert as date-time datatype. but with the same above format.
11-30-2017 07:57 AM
Date.parse is already parsing it to a date object. Is that not good for you? What is the need for toLocaleDateTimeString again?
Am I missing something here?