Is line 4 required or can I import the ISO 8601 fo...
# suitescript
c
Is line 4 required or can I import the ISO 8601 formatted date without worrying about the timezone? Source date value: 2023-12-09T002900Z
Didn't work - here's the fixed version for anyone interested:
Copy code
let dateObject = new Date(shippingDate);
let netsuiteFormattedDate = format.format({
    value: dateObject,
    type: format.Type.DATE
});
fulfillmentRecord.setValue({
    fieldId: 'trandate',
    value: new Date(netsuiteFormattedDate)
});
It looks like format.format is returning a string, the string needs casting back into a Date object before passing into the field in NS. I also took the timezone value away and allowed NS to handle that implicitly.
w
format.format seems unnecessary. Just use the Date object directly?
c
Fair point. I’ll go back and test that.