```moment(someDate).format("DD/MM/YYYY")``` Logs o...
# suitescript
r
Copy code
moment(someDate).format("DD/MM/YYYY")
Logs out in the correct format, not sure why it's not accepting it. Do I have to wrap format.format around it?
Fixed it by using format.parse:
Copy code
format.parse({
    type: format.Type.DATE,
    value: moment(ceaseDate).format("DD/MM/YYYY").toString()
})
Not sure why format.format didn't like it - considering moment returns an object - but using toString() and .parse seemed to do the trick.
t
The suitescript probably could not convert the object to something usable by the parser. The object was not compatible with suitescript
b
basic rule of date fields, use a Date with setValue, use a string with setText