Any suggestions for formatting dates? I keep getti...
# suitescript
d
Any suggestions for formatting dates? I keep getting "Invalid Field Value, format must be M/D/YYYY" or I get "The field startdate contained more than the maximum number ( 10 ) of characters allowed." when trying to use just new Date() or format.parse and format.format. Does it have anything to do with it being a MR script?
b
what does the code look like
d
message has been deleted
@battk
b
first off you need to use a Date with setValue
your input is a string
your attempt to convert a string to a Date is failing, format.parse only works with strings in NetSuite's date time formats
your string isnt
and when format.parse fails, it returns your input string instead of throwing an error