12-16-2020 01:50 PM
How do you convert this date “2020-09-01T00:00:00.000” to this “20200901”?
12-16-2020 02:04 PM
I’m double checking, but I think you have to use one of the formats listed in the Parsing a Date example in the documentation.
12-16-2020 02:26 PM
@cjhoward18 to the rescue. 🙂
Date.parse("2020-09-01T00:00:00.000").toLocaleDateString({"format":"yyyyMMdd"})
12-16-2020 02:30 PM
Thanks, will this work with variable?
Date.parse(“$HIRE_DATE”).toLocaleDateString({“format”:“yyyyMMdd”})
12-16-2020 02:31 PM
You shouldn’t need the quotes around the variable, but it should work if it’s a string.