menu_logo

menu_view_template done edit menu_subscribe menu_add menu_publish iOS Create Account Login
menu_clear
  • menu_insert_row
  • menu_delete_row
  • menu_insert
  • menu_share_template
  • menu_share_results
  • menu_duplicate
  • menu_view_source
  • menu_view_calc_log
  • menu_settings
  • menu_tags
  • help
  • menu_profile
  • menu_log_out
menu_preview_only
details_tap
details_type
details_title

Math Functions: Dates Calculator

Math Functions: Dates

List of date math functions. Many functions include links to more in-depth descriptions and examples. Note that dates cannot be solved in solving equations. Instead, calculate dates or results from date using direct computation only.
[https://.../t/help_variables_dates|Learn more about dates as variables.]
__These functions are only available in templates.__

Creating Dates

Variable =

To create a variable as a date, use / or - to separate date components to match the designated Setting and assign that to a variable. See the [https://.../t/help_variables_dates | Date Variables] section for more details on creating date variables.

Date

++date(day; month; year)++
Returns a date type from the provided 1- or 2-digit 'day', 1- or 2-digit 'month' and 2- or 4-digit 'year'.
__This function is only available in templates.__
** Details**
- 'day', 'month' and 'year' must be whole numbers or each will be truncated to one
- Solving for 'day', 'month' or 'year' will return an "Invalid data type" error
**Examples**
[https://.../t/help_variables_dates | Date Variables]
[https://.../t/14281bc479e37462cae8 | Age]
[https://.../t/7e534c6eb51c7ee32300 | Time Between Dates]

Today

++today()++
Returns today's date.
__This function is only available in templates.__
** Details**
- When creating templates, today's date assigned to a variable is denoted as 0/0/0

Date Information

Day

++day(date)++
Returns the day in the date type 'date'.
__This function is only available in templates.__
** Details**
- Solving for 'date' will return an "Invalid data type" error
**Examples**
[https://.../t/14281bc479e37462cae8 | Age]
[https://.../t/7e534c6eb51c7ee32300 | Time Between Dates]

Month

++month(date)++
Returns the month in the date type 'date'.
__This function is only available in templates.__
** Details**
- Solving for 'date' will return an "Invalid data type" error
**Examples**
[https://.../t/14281bc479e37462cae8 | Age]
[https://.../t/7e534c6eb51c7ee32300 | Time Between Dates]

Year

++year(date)++
Returns the year in the date type 'date'.
__This function is only available in templates.__
** Details**
- Solving for 'date' will return an "Invalid data type" error
**Examples**
[https://.../t/14281bc479e37462cae8 | Age]
[https://.../t/7e534c6eb51c7ee32300 | Time Between Dates]

Weekday

++weekday(date)++
Returns a number representing the day of the week for 'date' where 1 is Sunday and 7 is Saturday.
__This function is only available in templates.__
** Details**
- Solving for 'date' will return an "Invalid data type" error

Date Math

Days Between Dates [ddays]

++ddays(date 1; date 2)++
Returns the number of days between 'date 1' and 'date 2' (date 2 - date 1). Assumes an actual day count method.
++ddays(date 1; date 2; method)++
Returns the number of days given the additional parameter of day count 'method' where 0 is actual days, 1 is 30/360, 2 is actual/360 and 3 is actual/365. Actual calculates the actual number of days, including leap days, between the two dates. 30/360 calculates 360 days per year plus 30 days for each remaining month plus the remaining days. Actual/360 calculates 360 days per year plus actual day count for the remainder. Actual/365 calculates 365 days per year plus actual day count for the remainder.
__This function is only available in templates.__
** Details**
- Solving for 'date 1' or 'date 2' will return an "Invalid data type" error
**Example**
[https://.../t/7d371d670fe89741851f|Date Conversions]
[https://.../t/7e534c6eb51c7ee32300 | Time Between Dates]

Adjust Date [adjdate]

++adjdate(date; days)++
Returns a date type that adds or subtracts 'days' from 'date'. Assumes an actual day count method.
++adjdate(date; days; method)++
Returns a date type that adds or subtracts 'days' from 'date' using 'method' where 0 is actual days, 1 is 30/360, 2 is actual/360 and 3 is actual/365. Actual calculates the actual number of days, including leap days, between the two dates. 30/360 calculates 360 days per year plus 30 days for each remaining month plus the remaining days. Actual/360 calculates 360 days per year plus actual day count for the remainder. Actual/365 calculates 365 days per year plus actual day count for the remainder.
++adjdate(date; days; months; years)++
Returns a date type that adds or subtracts 'days', 'months' and 'years' from 'date'
__This function is only available in templates.__
** Details**
- Positive 'days', 'months' or 'years' adds to 'date' appropriately while negative 'days', 'months' or 'years' subtracts from 'date' appropriately
- 'day', 'month' and 'year' must be whole numbers or each will be truncated to one
- date + days and date - days returns the same results as adjdate(date; days)
- Solving for 'date', 'days', 'months' or 'years' will return an "Invalid data type" error
**Example**
[https://.../t/7d371d670fe89741851f|Date Conversions]

Keywords

-------------
Today
today()
Day
day()
Month
month()
Year
year()
Weekday
weekday()
Days Between Dates
ddays()
Adjust Date
adjdate()