PARSEDATE function
TextualDate
The text string containing a date.
DateFormat
The date format the given text string uses. Use DateFormat.MonthDateFormat,Month for a text string where only the month and year of the date are used ("Nov 1981"). Use DateFormat.NumericDateFormat,Numeric for a text string where the day, month and two-digit year appear as numbers ("11/14/81"). Use DateFormat.AbbreviatedDateFormat,Abbreviated for a text string where the day and year appear as numbers and the month as an abbreviated version of its name ("Nov 14, 1981"). If the month is written out in full, use DateFormat.FullDateFormat,Full ("November 14, 1981"). Use DateFormat.FullDayInWeekDateFormat,FullDayInWeek if the day of the week is included ("Saturday, November 14, 1981"). All examples use US English date formatting.
Returns
The date found in the given text string, as a sequential serial number.
Interprets a text string as a date and returns it. PARSEDATE("11/14/81", DateFormat.Numeric)PARSEDATE("11/14/81"; DateFormat,Numeric) returns a sequential serial number representing November 14, 1981. (The time is set to 00:00 AM.)
PARSEDATE takes the language of the app into account when converting text strings to dates. When PARSEDATE is used with an app whose language is set to German, for instance, text strings representing dates should follow German date formatting conventions.
The formula above should be written as follows when the language is set to German:
This function is specific to Calcapp.
Date format
The second parameter must be set to the date format used by the first parameter. These are the allowed values:
Date format | US English example |
---|---|
DateFormat.Month
|
Nov 1981 |
DateFormat.Numeric
|
14/11/81 |
DateFormat.Abbreviated
|
Nov 14, 1981 |
DateFormat.Full
|
November 14, 1981 |
DateFormat.FullDayInWeek
|
Saturday, November 14, 1981 |
Related functions
- Use FORMATDATE to create text strings that can be interpreted by this function.
- Use PARSETIME to turn text strings produced by FORMATTIME back into times.
- Use FORMATTIME to create text strings that can be interpreted by the PARSETIME function.
Examples
Returns a sequential serial number representing November 14, 1981, if the language of the app is set to US English. The time is set to 00:00 AM.
Returns a sequential serial number representing November 14, 1981, if the language of the app is set to German. The time is set to 00:00 AM.
Returns a sequential serial number representing November 14, 1981, if the language of the app is set to US English. The time is set to 3:30 PM. The integer part of a sequential serial number represents the date and the fractional part represents the time, meaning that adding together a sequential serial number representing a date and a sequential serial number representing a time correctly combines them.
Returns a sequential serial number representing November 1, 1981, if the language of the app is set to US English.
Returns a sequential serial number representing November 14, 1981, if the language of the app is set to US English.
Returns a sequential serial number representing November 14, 1981, if the language of the app is set to US English.
Returns a sequential serial number representing November 14, 1981, if the language of the app is set to US English.