Question

Set date field through formula

  • 13 July 2023
  • 1 reply
  • 78 views

Badge

I have a DocGen Package letter template where I need to set up the date field as 1/1/20xx (whatever the next year is). 


1 reply

Userlevel 1
Badge +7

Try creating a field within a field ...

  1. Insert a Date field. The field codes will look like this { DATE  \@ "MMM d, yyyy"  \* MERGEFORMAT }
  2. Edit the field to show just the year: { DATE  \@ "yyyy"}
  3. Press Ctrl + F9 to create a new blank field: {  }
  4. In the blank field, type = 1 + The result should look like this: { = 1 + }
  5. Finally, cut the date field and paste it into the new field just after the plus sign: { = 1 + {DATE \@ "yyyy"} }
  6. Toggle the field codes and update the field to see 2024.

If that doesn’t work, you may need to use the Excel As Middleware option.

Good luck! :)

Reply