This may be a stupid question...but how do I return today's date in SuiteScript? I know that I can return the date/time with "new Date()" but I don't want the time returned.
✅ 1
p
Petter
02/03/2021, 2:04 PM
you can use N/Format
Petter
02/03/2021, 2:04 PM
format.format({value: new Date(), type: format.Type.DATE})
❤️ 2
a
Ava
02/03/2021, 2:33 PM
I use Moment.JS when I work with dates and find it very helpful
https://momentjs.com/