Setting a date field with @Setfield

I have an agent that looks like this:

FIELD MarktoDeleteDate:=MarkToDeleteDate;

@If(@Prompt([YesNo]; “Caution”;"Mark the currently selected document for deletion? ")=1;

@Do(

@Command( [EditDocument] ; “1”; “1” );

@SetField(“MarkToDeleteDate”;@Now);

“”)

When it runs, the field MarkToDeleteDate, which is a date field, gets filled in with the text value of the date instead of a date value. How can I correct this? The agent needs to run run from a view with a document selected or from the document.

Subject: Setting a date field with @Setfield

Check the DataType of the ‘MarkToDeleteDate’ field on the form and make sure it is set to a Time-Date field. Also check any input translation formulas on the field.

Subject: RE: Setting a date field with @Setfield

I think I found the problem. The field is a Date/Time field, but somehow I had a Default Value set with text. Doh!