cancel
Showing results for 
Search instead for 
Did you mean: 

Can you add days to a date placeholder?

Sam_Dyse1
Confirmed Champ
Confirmed Champ

Is there anyway to add days to date placeholder.  For example, I want my placeholder to read 15 days from today's date.

1 ACCEPTED ANSWER

Ather_Jan
Champ on-the-rise
Champ on-the-rise

Hi Sam,

I do not think there's anything of that sort in templates. However, you can create a hidden field in the form that will copy the date and modify it to add 15 days and then create the placeholder for that keyword.

View answer in original post

2 REPLIES 2

Ather_Jan
Champ on-the-rise
Champ on-the-rise

Hi Sam,

I do not think there's anything of that sort in templates. However, you can create a hidden field in the form that will copy the date and modify it to add 15 days and then create the placeholder for that keyword.

Jay_Hatch
Confirmed Champ
Confirmed Champ

I know this post was years ago, but I had the same question today, and this was my workaround (in case someone else ventures here)

 

We wanted a way to do a date calculation on a date Placeholder when Composing a document from a Document Composition Template without using workflow, form, or workview object. 

 

In the Document Composition Template, we created a Database Query placeholder.  The SQL query used the 'itemdata' table in the OnBase database (any database/table would work) ... we didn't need data from the query, we just needed the dateadd function in SQL.

 

The query we used was this:

 

Select Top 1 dateadd(month,-1,GETDATE()) 'itemdate' from [onbase].[hsi].[itemdata]

 

During Placeholder configuration, we selected "Insert the first result of a single Column" as the Output Style and used the column name 'itemdate'

 

I'm sure there are other ways, but this one worked for our needs.