Skip to main content
Participating Frequently
June 4, 2021
Question

Auto generate the date and time but display as yyyymdHHMM

  • June 4, 2021
  • 1 reply
  • 349 views

I'm looking to create a field that is auto generated each time i use the pdf. This field needs to auto generate using date and time but be displayed as "yyyymdHHMM". any assistance would be greatly appreciated. 

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
June 4, 2021

As document level script use this:

var date = new Date();
this.getField("Date").value = util.printd("yyyymdHHMM",date);

adjust field name if neccessary.