Calculating dates on form

I have a form where user enters a date, then I use the following code to get a date 90 days prior (thanks to earlier post in this forum).

@Adjust( fieldname ; 0 ; 0 ; -90 ; 0 ; 0 ; 0 )

This works great for editing documents already in the database. However, when I try to create a new document, I get an error. “Field: ‘datenotice’: Incorrect data type for operator or @function: time/date expected.”

As I explained in earlier post, I have not designer training, just on the job trial and error. Thanks for help!

Subject: calculating dates on form

Since the “fieldname” it blank when a new document is created, the formula returns an error which you have missed to handle.Just change your formula to :

@If(fieldname=“”;@Return(“”);@Adjust( fieldname ; 0 ; 0 ; -90 ; 0 ; 0 ; 0 ))

cheers !!

Ashish