Dates
Panorama has a special data type for storing dates. When you use the date type to store your dates, Panorama can sort your dates in the correct order, check your dates for validity as they are entered, and calculate the number of days between two dates. Dates are quite compact; almost any date in the 20th or 21st century will take up only two bytes of storage.

#### Formatting Dates as Text

Internally, Panorama stores dates as an integer number. But when a date is displayed or printed, it is converted to text so that you can read it. This conversion can take different forms, for example the date July 20, 1969 could be formatted many ways, some of which are shown here:

    7/20/69
    07/20/69
    20-Jul-69
    July 20th, 1969

By default, Panorama will pick the simplest format, but you can explicitly control how dates are formatted by using a Date Pattern. See Date Patterns to learn all the details.

#### Entering Dates

Panorama is very flexible about how you type dates. We call this feature smart dates. You can enter dates numerically (for instance `04/09/02` or `4/9/2`) or you can spell out the date (for instance `April 9th, 1997` or `Apr 9 97`). You can use any character as a separator between numeric dates, for example `4-9-01` or even `4.9.01`.

To enter today’s date, simply type `today`. You can also enter `yesterday` or `tomorrow`. Panorama will automatically convert these entries to the correct month, day and year.

If the date is in the current week, you can simply type in the name of the day, for example `saturday` or `tue`. To specify a day in the previous or upcoming weeks add the words last or next, for example `next tuesday` or `last saturday`.

#### Default Year and Century

When you enter a date, you can leave the year off and let Panorama figure it out for you. Panorama will automatically round the date to the nearest year. For instance, if today’s date is 1/11/17 and you enter the date 4/1 then Panorama will assume you mean 4/1/17. But if you enter 12/12 (or December 12) Panorama will assume you mean 12/12/16, not 12/12/17, because 12/12/16 is closer to 1/11/17 than 12/12/17 is.

Panorama also fills in a missing century. Panorama will assume the date is in the past unless it would be within the next five years. This is because specific dates in the past, like birth dates, are much more common than specific dates in the future. It would be unusual to specify a date more than 18 months into the future, but dates from 60, 70 or 80 years ago are much more common (especially birth dates). For example, if the current year is 2017 and you enter the date `7/2/21` Panorama will assume you mean 7/2/2021 but `7/2/24` will be assumed to be 7/2/1924. If you want to specify a date more than five years in the future, simply be sure to fill in the entire century rather than just the last two digits of the year, for example `7/2/2024`.

See Also

- Choices -- fixed list of choices.
- Data Types -- different types of data that can be stored in Panorama, including text, numbers and dates.
- Numeric Data -- numeric data (fixed and floating point).

History

Version | Status | Notes
10.0 | The treatment of missing century specifications has been changed. | Carried over from Panorama 6.0