Data - Date Operations

Ribbon bar. Select the Data tab. In the Transformations group, click Date/Time to display the Date Operations dialog box...

Classic menus. From the Data menu, select Date Operations to display the Date Operations dialog box...

...which contains options to manipulate date variables.

Use the options on the Numeric Dates tab to create a single date variable from two or three variables (containing the month and year; day and month; day and year; or month, day, and year) or split a single date variable into one, two, or three variables (one each for the month and year; day and month; day and year; or month, day, and year). The Destination Variables and Source Variables groups are used to specify the new variable(s) that is (are) being created from the original date variable(s), respectively. To display a list of the current variables in the data file, double-click (or press F2) in Day, Month, Year, or Name boxes. When the Create Date from 2 or 3 Variables option button is selected, you will have the option of selecting a different format for the new variable from the Format box or selecting the Data-defined Date Format check box.

Use the options on the Text Dates tab (illustrated below) to transform a date variable into a variable containing date text labels with numeric equivalents in a range that will allow STATISTICA to use them as codes (i.e., numeric values less than 32,000) or to transform a variable containing text labels to a date variable. The Variables group is used to specify both the Source and Destination variables. Note that to display a list of the current variables in the data file double-click (or press F2) in these fields.

When the Date Variable to Variable with Text Labels option button is selected, use the Text Label Compatibility group to specify the creation of either Version 6 text labels (the format of the text label of the new variable will be the same as the original date variable) or Version 5 text labels (the format will always be MONDD_YY, e.g., SEP05_74). When the Variable with Text Labels to Date Variable option button is selected, use the Format drop-down box to specify the format of the new date variable.

Note: Conversion of Julian days to displayed dates. The exact algorithm of how integer values (Julian date or "days") are converted to standard dates and vice versa is affected by the setting of the Adjust Julian dates to account for no leap year in 1900 option in the Options dialog box - Spreadsheet tab. For example, a date entered and displayed as 1/21/1968 may be stored as the Julian date 24858 or 24856, depending on the setting of that option. See also, How are dates represented in STATISTICA data files?