groupdatepattern(
DATE
,
PATTERN
)
The groupdatepattern( function converts a number representing a date into text in a special format for use with the summarytable( and crosstab( functions. The function uses a pattern to control how the date is formatted (see Date Patterns).
Parameters
This function has two parameters:
date – is the number you want to convert to text. This number is treated as the number of days since January 1, 4713 B.C.
pattern – is text that contains a pattern for formatting the date (see Date Patterns).
Description
This function converts a number representing a date into text in a special format for use with the summarytable( and crosstab( functions. The function uses a pattern to control how the date is formatted (see Date Patterns).
groupdatepattern(Date,"mm/dd/yy") ☞ 8/9/12
groupdatepattern(Date,"MM/DD/YY") ☞ 08/09/12
groupdatepattern(Date,"mm/dd/yyyy") ☞ 8/9/2012
groupdatepattern(Date,"Mon yy") ☞ Aug 12
groupdatepattern(Date,"Month yyyy") ☞ August 2012
groupdatepattern(Date,"MON-yy") ☞ AUG-12
groupdatepattern(Date,{Qtr "Quarter" yyyy}) ☞ 3rd Quarter 2012
groupdatepattern(Date,{yyyy}) ☞ 2012
Technical Note: This function should only be used with the summarytable( and crosstab( functions. The groupdatepattern( function appends a special prefix to the output that allows these functions to list the date values chronologically instead of alphabetically. These functions automatically strip out the prefix before displaying the date, but if you use this function anywhere else, the prefix will be visible. Use the datepattern( function if you don’t want this special prefix (basically always except when using the summarytable( and crosstab( functions).
See Also
- aggregate( -- calculates an aggregate (sum (total), count, minimum, maximum or average) by scanning specified records in a database.
- calendardate( -- helps in creating monthly calendars.
- calendarday( -- helps in creating monthly calendars.
- Crosstab Workshop -- tool for two dimensional summarizing, analyzing and charting large amounts of data.
- crosstab( -- converts information in a database into a crosstab table (tab delimited text).
- Date Patterns -- control how dates are displayed or converted to text.
- date( -- converts text into a number representing a date.
- datepattern( -- converts a number representing a date into text. The function uses a pattern to control how the date is formatted (see Date Patterns).
- datevalue( -- converts integer values for year, month and day into a number representing a date.
- dayofweek( -- computes the day of the week, with Sunday being 0, Monday 1, etc.
- dayvalue( -- extracts the day from a date as a numeric value.
- firstdayofweek( -- returns the user's preference for first day of the week.
- formulasum -- calculates a total by scanning a database, returning the accumulated sum of evaluating a formula over and over again for each scanned record.
- month1st( -- computes the first day of a month.
- monthlength( -- computes the length (number of days) of a month.
- monthmath( -- takes a date and computes the date that is one or more months before or after the original date.
- monthvalue( -- extracts the month from a date as a numeric value.
- naturaldate( -- converts a number representing a date into text using "natural" formatting.
- quarter1st( -- computes the first day of a quarter.
- quartervalue( -- extracts the quarter from a date as a numeric value.
- refreshsummarydatabase -- refreshes a summary database.
- regulardate( -- extracts a regular date (number of days from January 1, 4713 B.C.) from a superdate.
- Summary Workshop -- tool for quickly summarizing, analyzing and charting large amounts of data.
- summarydatabaseselectoriginal -- selects original data corresponding to a cell in an exported summary table database.
- summaryselectoriginalformula -- returns the formula that will select the original data associated with a summary table row.
- summarytable( -- scans a database to build a text array containing summary breakdown information: totals, averages, etc.
- summarytablepopup -- handles a click on a summary table text list.
- superdate( -- converts a regular date and a regular time into a superdate.
- superdatepattern( -- converts a number containing a superdate to text, allowing you to specify the patterns for both the date and the time conversion to text.
- superdatesecondsstr( -- converts a number containing a superdate to text, including the seconds.
- superdatestr( -- converts a number containing a superdate (date + time) to text.
- supernow( -- returns the number representing the current date and time as a superdate.
- today( -- returns a number corresponding to today's date.
- week1st( -- computes the first day of a week (Sunday).
- weekvalue( -- extracts the week from a date as a numeric value.
- year1st( -- computes the first day of a year.
- yearvalue( -- extracts the year from a date as a numeric value.
History
10.1 | New | New in this version. |