Are dates appearing shifted by one day in your generated documents? Check out our troubleshooting guide for how to fix this.
Are you using a formula where the date input may be blank? Check out this article.
When inserting a date into a document using a placeholder, DocuGen will insert dates in the format dd Mmm yyyy. For example, 30 Apr 2021.
However, using simple workarounds you can display dates in other formats by adding a formula column (say, "Due Date 2") with one of the following formulas. Make sure your placeholder in the document template refers to "Due Date 2".
(🤔 If you are looking for better support for different date formats, vote for it here!)
American short format (mm/dd/yyyy)
For example, 12/31/2021:
month({Due Date}) & "/" & day({Due Date}) & "/" & year({Due Date})
European short format (dd/mm/yyyy)
For example, 31/12/2021:
day({Due Date}) & "/" & month({Due Date}) & "/" & year({Due Date})
Long format (mmmm dd, yyyy)
For example, September 30, 2021:
If(month({Due Date}) = 1, "January", "")
& if(month({Due Date}) = 2, "February", "")
& if(month({Due Date}) = 3, "March", "")
& if(month({Due Date}) = 4, "April", "")
& if(month({Due Date}) = 5, "May", "")
& if(month({Due Date}) = 6, "June", "")
& if(month({Due Date}) = 7, "July","")
& if(month({Due Date}) = 8, "August", "")
& if(month({Due Date}) = 9, "September", "")
& if(month({Due Date}) = 10, "October", "")
& if(month({Due Date}) = 11, "November", "")
& if(month({Due Date}) = 12, "December", "")
& " " & day({Due Date})
& ", " & year({Due Date})
Long format (dd mmmm yyyy)
For example, 30 September 2021:
day({Due Date}) & " "
& If(month({Due Date}) = 1, "January", "")
& if(month({Due Date}) = 2, "February", "")
& if(month({Due Date}) = 3, "March", "")
& if(month({Due Date}) = 4, "April", "")
& if(month({Due Date}) = 5, "May", "")
& if(month({Due Date}) = 6, "June", "")
& if(month({Due Date}) = 7, "July","")
& if(month({Due Date}) = 8, "August", "")
& if(month({Due Date}) = 9, "September", "")
& if(month({Due Date}) = 10, "October", "")
& if(month({Due Date}) = 11, "November", "")
& if(month({Due Date}) = 12, "December", "")
& " " & year({Due Date})
Weekdays
If you want to just show the weekday (Monday, Tuesday, etc.) in your document, add a new formula column that contains the following formula (still assuming we're using the Due Date column):
if(rounddown(mod(days({Due Date}, date(2000,1,2)),7),0)=1, "Monday", "")
& if(rounddown(mod(days({Due Date}, date(2000,1,2)),7),0)=2, "Tuesday", "")
& if(rounddown(mod(days({Due Date}, date(2000,1,2)),7),0)=3, "Wednesday", "")
& if(rounddown(mod(days({Due Date}, date(2000,1,2)),7),0)=4, "Thursday", "")
& if(rounddown(mod(days({Due Date}, date(2000,1,2)),7),0)=5, "Friday", "")
& if(rounddown(mod(days({Due Date}, date(2000,1,2)),7),0)=6, "Saturday", "")
& if(rounddown(mod(days({Due Date}, date(2000,1,2)),7),0)=0, "Sunday", "")
Eight-digit format (YYYY-MM-DD)
For example, 2022-03-24 (representing 24 March 2022):
year({Due Date})
& "-"
& right("0" & month({Due Date}), 2)
& "-"
& right("0" & day({Due Date}), 2)
You can use dashes ("-") or any other text separator.
Comments
0 comments
Please sign in to leave a comment.