This may be a stupid question...but how do I retur...
# suitescript
m
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
you can use N/Format
format.format({value: new Date(), type: format.Type.DATE})
❤️ 2
a
I use Moment.JS when I work with dates and find it very helpful https://momentjs.com/
p
☝️ indeed very useful as well
m
format.format worked perfectly...thanks a ton!