cancel
Showing results for 
Search instead for 
Did you mean: 

How to parse a string in an object to Date

AvaniAnand
New Contributor

How can I parse a string in an object to Date?

eg. Date.parse($vendorBill.tranDate, "dd-MM-YYYY") gives me NaN

How would I parse this correctly to return the date in the $vendorBill.string object please?

1 REPLY 1

JensDeveloper
Contributor II

Hi @AvaniAnand ,

How does the value $vendorBill look like? is it an epoch number or already a value that looks like a date?
I played around with these https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439344/Date+Functions+and+Properties , when testing/parsing dates
Regards