SuperDates combine the date and time into a single number…the number of seconds since January 1, 1904. SuperDates make it easy to calculate time intervals across multiple days. However, SuperDates take up more storage than regular dates, and are not as easy to work with. In addition, SuperDates are limited to dates after 1904. (In Panorama 6 and earlier versions, SuperDates were limited to dates between 1904 and 2040, but the 2040 limitation no longer applies to Panorama X. However, if you have a Panorama 6 database that contains SuperDates, you should use the fixsuperdates statement after converting the database to make sure that the values are correct in Panorama X.) Panorama has several functions for working with SuperDates.

superdate(date,time) This function converts a regular date and a regular time into a superdate. The date parameter is a regular Panorama date. This date must be after 1904 A.D. The time parameter is the number of seconds since midnight, usually computed with the seconds( or time( functions ([see Time Arithmetic Formulas). The result is a single value that combines both the date and time into a single number that can be used for multi-day calculations.

regulardate(number) This function extracts a regular date (number of days from January 1, 4713 B.C.) from a superdate. You can then format this date with the datepattern( function, as is shown in this example (which assumes that the field or variable Arrival contains a SuperDate value).

datepattern(regulardate(Arrival),"Month dd, yyyy")

regulartime(number) This function extracts a regular Panorama time (seconds since midnight) from a SuperDate. You can then format this date with the timepattern( function, as is shown in this example (which assumes that the field or variable Arrival contains a SuperDate value).

timepattern(regulartime(Arrival),"hh:mm am/pm")

superdatepattern(number, datepattern,timepattern) Converts a number containing a superdate to text, allowing you to specify the patterns for both the date and the time portions (see Date Patterns and timepattern(). For example the formula

superdatepattern(supernow(),"Month ddnth yyyy @ " ,"hh:mm am/pm")

will result in something like July 10th, 2008 @ 1:36 PM.

superdatesecondsstr(number) Converts a number containing a superdate to text in standard format including seconds (for example 4/20/03 9:56:37 AM).

superdatestr(number) Converts a number containing a superdate to text in standard format (for example 4/20/03 9:56 AM).

supernow() This function returns the number representing the current date and time as a superdate value (number).


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0