PARSEDATE function

PARSEDATE(TextualDate, DateFormat) PARSEDATE(TextualDate; DateFormat)

TextualDate

Text or { Text }

The text string containing a date.

DateFormat

DateFormat or { 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

Number or { Number }

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:

PARSEDATE("14.11.81", DateFormat.Numeric)PARSEDATE("14.11.81"; DateFormat,Numeric)

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

Examples

PARSEDATE("11/14/81", DateFormat.Numeric)PARSEDATE("11/14/81"; DateFormat,Numeric)

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.

PARSEDATE("14.11.81", DateFormat.Numeric)PARSEDATE("14.11.81"; DateFormat,Numeric)

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.

PARSEDATE("11/14/81", DateFormat.Numeric) + PARSETIME("3:30 PM", TimeFormat.HourMinute)PARSEDATE("11/14/81"; DateFormat,Numeric) + PARSETIME("3:30 PM"; TimeFormat,HourMinute)

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.

PARSEDATE("Nov 1981", DateFormat.Month)PARSEDATE("Nov 1981"; DateFormat,Month)

Returns a sequential serial number representing November 1, 1981, if the language of the app is set to US English.

PARSEDATE("Nov 14, 1981", DateFormat.Abbreviated)PARSEDATE("Nov 14, 1981"; DateFormat,Abbreviated)

Returns a sequential serial number representing November 14, 1981, if the language of the app is set to US English.

PARSEDATE("November 14, 1981", DateFormat.Full)PARSEDATE("November 14, 1981"; DateFormat,Full)

Returns a sequential serial number representing November 14, 1981, if the language of the app is set to US English.

PARSEDATE("Saturday, November 14, 1981", DateFormat.FullDayInWeek)PARSEDATE("Saturday, November 14, 1981"; DateFormat,FullDayInWeek)

Returns a sequential serial number representing November 14, 1981, if the language of the app is set to US English.