cancel
Showing results for 
Search instead for 
Did you mean: 

Convert UTC date to date

mtran21
New Contributor III

How do you convert this date “2020-09-01T00:00:00.000” to this “20200901”?

11 REPLIES 11

mtran21
New Contributor III

I got this error
image

HIRE_DATE is a datetime data from Oracle

Then you should try:
$HIRE_DATE.toLocaleDateString({"format":"yyyyMMdd"})


Diane Miller

mtran21
New Contributor III

Got this error

image

Try this:

Date.parse($HIRE_DATE.toString()).toLocaleDateString(...)

mtran21
New Contributor III

Absolutely beautiful. It worked
Date.parse($HIRE_DATE.toString()).toLocaleDateString({“format”:“yyyyMMdd”})

Thank you @ptaylor and @dmiller