i trying to get value of date but getting Fri Feb ...
# general
t
i trying to get value of date but getting Fri Feb 04 2022 000000 GMT-0800 (PST) how to get date 4/16/2022 in this format?
z
In code or where?
t
yeah in scripting
z
You can use the n/format module or use js native new Date() logic
let yourDate = new Date('Fri Feb 04 2022 00:00:00 GMT-0800 (PST)');
let newFormat = yourDate.getMonth() + '/' + yourDate.getDay() + '/' + yourDate.getUTCFullYear()
b
the question is a little weird
your value looks like the string representation of a Date, but it has the wrong offset for pacific time
where are you getting the value from