Best practice for including date and timestamps in Formatted Output?

We have formatted output that displays a Date Generated in the footer and noticed that on some pages that date is one day in the future and not the current date. We were able to duplicate the issue by running a report on a laptop that had Chrome open overnight. It happens on different pages and not for every user.

I learned on an Adobe forum that the problem may related to the code we are using to display the Date Generated.

This is the code in our master pages that displays in the footers:

// Current Date in short-style date format.

$.rawValue = num2date(date(), DateFmt(1))

Have you ever seen a problem like this on your formatted output? How are you coding your date and timestamps?


1 comment

  • Avatar
    Chris Boschen Official comment

    Hi Dan,

    You may appreciate a more simple approach to get the Date Generated for your formatted output:

    You can create a formula field (with type of Text) in Vault on the object type in question which uses a formula (with type of Text) to display "today". The field does not need to be on a page layout. You can then reference the field in your Formatted Output template and be guaranteed a predictable behavior. The added benefit here is that you get full control on the formatting of whatever Today is, and you can use the system's Today or Today as per the timezone of the user running the report.

    Best Regards,

Please sign in to leave a comment.