In lotusScript: I've used:
doc.DocDate = Format(document.get("DatePublished"),"mm/dd/yyyy") 'Rem return 08/22/2017
In formula: I've used for to get year:
@Year(DocDate)
But when i run the program i get the error : "incorrect data type for operator or @function time/date expected". How to fix it?
Get date value with
or
Then your field DocDate should be calculated properly.
@Year()
expects a NotesDateTime value. DocDate is a String value though. You can change your formula toand it will work if your language settings are set to US date format.