Morning all, Anyone ever come across this before?...
# suitescript
r
Morning all, Anyone ever come across this before? Is it a bug within NetSuite or expected behaviour? If I put a format.parse with the type being format.Type.DATE, it seems to like it but seems odd to me
b
Use a Date with setValue, use a string with setText
r
Ah that makes sense. Suppose you don't know if moment is already a Date object? I think it is but not 100% sure
s
moment is not a date object, its an object
r
Thanks @Sandii
s
you can
toDate()
though
99% of the time, just put the moment string in the format of the user/system and use setText
👍 1
b
you should use N/format unless you dont need to worry about different users having different date/time/timezones formats