I have an ISO 8601 date time value (like 2019-03-1...
# suitescript
c
I have an ISO 8601 date time value (like 2019-03-13T163055Z) and I need to get it into NS using SS2. Does anyone have a little function for doing so?
n
var date = today.toISOString().substring(0, 10); The first 10 chars are what you need to set. Although a string in ISO format should also work. Not a Date() object though
If you want Time as well to be set, I think you'll need to replace 'T' with ' '
But the key would be to set a string and not a Date Object.