Menu

Dates

Updated: 2025-09-16

Some dates can be directly extracted from fields in the tax return file. Others are constants that TaxCycle understands and calculates based on the system time on your computer and the tax year end date. The following list of functions and constants can help you insert a date into a template or condition and display it in the desired format.

Date Constants

Field code Description  Sample result

{{ today() }}

Inserts the system date for the computer where the file is open. You can combine it with the format() function to control the output: {{ format(today())}}.

2025-12-01 12:00:00 AM 

{{ Constants.CurrentTaxationYear }}

Inserts the tax year for the currently-open file.

2024

{{ Constants.NextTaxationYear }}

Inserts the tax year for the following year relative to that in the currently-open file.

2025

{{ date(2025, 02, 18) }} Specific date, using the {{date(YYYY, MM, DD)}} format. Use this in conditions or when calculating dates. 2025-02-18 12:00:00 AM

Date Formatting

Apply the format() function to a field code to display the date in a desired format.

  • Without the format() function, the date displays as the full date and time: YYYY-MM-DD hh:mm:ss AM/PM
  • When you add the format() function, the date displays as a long date, with the month, day and year: January 2, 2003
  • Use a date format parameter to the format() function to further change the display. Add a comma after the field code and then enter the format variable between the double quotes using the date of January 2, 2003. TaxCycle will replace this date with the calculated date when it displays the client data. Alternatively, you can use traditional date format masks. See the table on the Microsoft Custom Date and Time Format Strings page for a list of supported format strings.

You can combine the format() function with other functions like today(), addymd() and addmonth().

Example Sample result
{{ CurrentClient.Info.CommonData.FileByDate }} 2025-04-30 12:00:00 AM
{{ format(CurrentClient.Info.CommonData.FileByDate) }} April 30, 2025
{{ format(CurrentClient.Info.CommonData.FileByDate, "January 2, 2003") }} April 30, 2025
{{ format(CurrentClient.Info.CommonData.FileByDate, "Jan 2, 2003") }} Apr 30, 2025
{{ format(CurrentClient.Info.CommonData.FileByDate, "2003-01-02") }} 2025-04-30
{{ format(CurrentClient.Info.CommonData.FileByDate, "03-01-02") }} 19-04-30
{{ format(CurrentClient.Info.CommonData.FileByDate, "03-Jan-02") }} 19-Apr-30
{{ format(CurrentClient.Info.CommonData.FileByDate, "yy-MMM-dd") }} 19-Apr-30
{{ format(CurrentClient.Info.CommonData.FileByDate, "January 2, 2003 at 4:05") }} April 30, 2025 at 1:22
{{ format(CurrentClient.Info.CommonData.FileByDate, "January 2, 2003 at 16:05") }} April 30, 2025 at 13:22

Date Comparison

Conditions based on a signing date field

{{# CurrentClient.Info.Filing.SigningDate != date() }}

{{# CurrentClient.Info.Filing.SigningDate = today() }}
Show this text if the return was signed today.
{{/end}}

{{# CurrentClient.Info.Filing.SigningDate < today() }}
Show this text if the signing date was yesterday or earlier.

Then, to count the number of days: signed {{ format(today() - CurrentClient.Info.Filing.SigningDate, “dd”) }} days ago.
{{/end}}

{{/end}}

Conditions to compare the due date with today's date:

{{# today() > CurrentClient.Info.CommonData.FileByDate }}
You are late.
{{/end}}

{{# today() < CurrentClient.Info.CommonData.FileByDate }}
You are early.
{{/end}}

{{# today() = CurrentClient.Info.CommonData.FileByDate }}
You are just in time.
{{/end}}

Adding Years/Months/Days

These functions can be used in conjunction with the format() function to control the output of the date.

addmonth()

Use the addmonth() function to add months to a date. Insert the number of months after the comma and before the closing parenthesis. To subtract, enter the number of months as a negative number, wrapped in parentheses.

Unlike addymd(), this function has a bias toward the last day of the month, allowing it to handle months of different lengths and leap years. If the date passed to the function is the last day of the month, the date returned will also be the last day of the month. For example, February 29, 2024, plus 1 month will be March 31, 2024, whereas February 28, 2024, plus 1 month will equal March 28, 2024.

The examples below assume a filing deadline of February 28, 2025:

Code Result
{{addmonth(CurrentClient.Engage.Engagement.FilingDeadline,2)}} 2025-04-30 12:00:00 AM
{{addmonth(CurrentClient.Engage.Engagement.FilingDeadline,(-3))}} 2024-11-30 12:00:00 AM
addymd()

Use the addymd() function to add years, months or days to a date.

Insert the number of years, months or days after the first comma, then the Y, M, D parameters.  The first parameter is the number of years, the second is the number of months and the third is the number of days. 

Unlike addmonth(), this function does not take into account leap years or the differing lengths of months. 

The following example assumes a filing deadline of February 28, 2025:

Code Result
{{addymd(CurrentClient.Engage.Engagement.FilingDeadline,0,1,1)}} 2025-03-29 12:00:00 AM