Date Variables Calculator
Date Variables
PowerOne can handle multiple data types. One of those is dates. Date variables are defined in day/month/year, month/day/year or year/month/day format where a slash (/) or dash (-) separates each component. Dates entered with dashes are converted to use slashes and two-digit years will be translated automatically to 4-digit years.
Note that there are three ways to represent a date. The expected and displayed date format is defined by Date Format by selecting [icon--app-more | extras button] then Profile
[https://.../t/help_variables|Learn more about variables].
Creating Dates
To set a date to March 10, 2016:
It is also common to want the date set to today's date. To do so set the date to 0/0/0:
This will automatically appear as today's date in the template when cleared.
PowerOne handles dates between the year 1900 and 3000. Two-digit years are automatically translated to four-digit years where 00 to 50 is assumed to be 2000 to 2050 and 51 to 99 is assumed to be 1951 to 1999.
Descriptions
A date can be followed by a description similar to other variables. In this example, expiration date serves as the description:
Dates or Equations?
Dates can look like equations and equations like dates. Is the following August 12, 2016 or a division problem?
PowerOne, by default, assumes three numbers divided by each other (or three numbers subtracted from each other) is a date. Of course, PowerOne could be wrong. In that case feel free to adjust the type in the details display.
Date Math
Dates can be used in math problems as well. PowerOne can handle adding a date and number of days, subtracting two dates, and subtracting a number of days from a date. There are also a number of dedicated functions for working with dates. See [https://.../t/help_functions_dates|math functions] for details.
PowerOne assumes you are assigning a date to a variable to perform math on it. Here's is the source:
for this calculation:
Date 1 = 8/11/2015
Number of Days = 25
Date 2 = 9/5/2015
There are two things to note:
#. PowerOne cannot solve for a date; it will return an "Invalid type or unit" error. In the example above you can calculate Date 2 but cannot solve for Date 1. It would require a separate equation to perform that math. See the [https://.../t/help_equations|Incorporating Multiple Equations] section.
#. Just adding a date into an equation will cause equals to treat that date as a division problem:
Instead, use the date function:
Keywords
Date 1
Number of Days
Date 2
-------------