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
battk
03/18/2022, 4:46 PM
what does the code look like
d
Dani
03/18/2022, 5:14 PM
message has been deleted
Dani
03/18/2022, 5:14 PM
@battk
b
battk
03/18/2022, 9:45 PM
first off you need to use a Date with setValue
battk
03/18/2022, 9:45 PM
your input is a string
battk
03/18/2022, 9:46 PM
your attempt to convert a string to a Date is failing, format.parse only works with strings in NetSuite's date time formats
battk
03/18/2022, 9:46 PM
your string isnt
battk
03/18/2022, 9:46 PM
and when format.parse fails, it returns your input string instead of throwing an error