Date/Time

  • ASCENSIONTHURSDAY Ascension Thursday in the Gregorian calendar according to the Roman rite of the Christian Church
  • ASHWEDNESDAY Ash Wednesday in the Gregorian calendar according to the Roman rite of the Christian Church
  • DATE create a date serial value
  • DATE2HDATE Hebrew date
  • DATE2HDATE_HEB Hebrew date in Hebrew
  • DATE2JULIAN Julian day number for given Gregorian date
  • DATE2UNIX the Unix timestamp corresponding to a date d
  • DATEDIF difference between dates
  • DATEVALUE the date part of a date and time serial value
  • DAY the day-of-month part of a date serial value
  • DAYS difference between dates in days
  • DAYS360 days between dates
  • EASTERSUNDAY Easter Sunday in the Gregorian calendar according to the Roman rite of the Christian Church
  • EDATE adjust a date by a number of months
  • EOMONTH end of month
  • GOODFRIDAY Good Friday in the Gregorian calendar according to the Roman rite of the Christian Church
  • HDATE Hebrew date
  • HDATE_DAY Hebrew day of Gregorian date
  • HDATE_HEB Hebrew date in Hebrew
  • HDATE_JULIAN Julian day number for given Gregorian date
  • HDATE_MONTH Hebrew month of Gregorian date
  • HDATE_YEAR Hebrew year of Gregorian date
  • HOUR compute hour part of fractional day
  • ISOWEEKNUM ISO week number
  • ISOYEAR year corresponding to the ISO week number
  • MINUTE compute minute part of fractional day
  • MONTH the month part of a date serial value
  • NETWORKDAYS number of workdays in range
  • NOW the date and time serial value of the current time
  • ODF.TIME create a time serial value
  • PENTECOSTSUNDAY Pentecost Sunday in the Gregorian calendar according to the Roman rite of the Christian Church
  • SECOND compute seconds part of fractional day
  • TIME create a time serial value
  • TIMEVALUE the time part of a date and time serial value
  • TODAY the date serial value of today
  • UNIX2DATE date value corresponding to the Unix timestamp t
  • WEEKDAY day-of-week
  • WEEKNUM week number
  • WORKDAY add working days
  • YEAR the year part of a date serial value
  • YEARFRAC fractional number of years between dates

ASCENSIONTHURSDAY

ASCENSIONTHURSDAY Ascension Thursday in the Gregorian calendar according to the Roman rite of the Christian Church

Synopsis

ASCENSIONTHURSDAY(year)

Arguments

year: year between 1582 and 9956, defaults to the year of the next Ascension Thursday

Note

Two digit years are adjusted as elsewhere in Gnumeric. Dates before 1904 may also be prohibited.

See also

EASTERSUNDAY.

ASHWEDNESDAY

ASHWEDNESDAY Ash Wednesday in the Gregorian calendar according to the Roman rite of the Christian Church

Synopsis

ASHWEDNESDAY(year)

Arguments

year: year between 1582 and 9956, defaults to the year of the next Ash Wednesday

Note

Two digit years are adjusted as elsewhere in Gnumeric. Dates before 1904 may also be prohibited.

See also

EASTERSUNDAY.

DATE

DATE create a date serial value

Synopsis

DATE(year,month,day)

Arguments

year: year of date

month: month of year

day: day of month

Description

The DATE function creates date serial values. 1-Jan-1900 is serial value 1, 2-Jan-1900 is serial value 2, and so on. For compatibility reasons, a serial value is reserved for the non-existing date 29-Feb-1900.

Note

If month or day is less than 1 or too big, then the year and/or month will be adjusted. For spreadsheets created with the Mac version of Excel, serial 1 is 1-Jan-1904.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

TODAY, YEAR, MONTH, DAY.

DATE2HDATE

DATE2HDATE Hebrew date

Synopsis

DATE2HDATE(date)

Arguments

date: Gregorian date, defaults to today

See also

HDATE, DATE2HDATE_HEB.

DATE2HDATE_HEB

DATE2HDATE_HEB Hebrew date in Hebrew

Synopsis

DATE2HDATE_HEB(date)

Arguments

date: Gregorian date, defaults to today

See also

DATE2HDATE, HDATE_HEB.

DATE2JULIAN

DATE2JULIAN Julian day number for given Gregorian date

Synopsis

DATE2JULIAN(date)

Arguments

date: Gregorian date, defaults to today

See also

HDATE_JULIAN.

DATE2UNIX

DATE2UNIX the Unix timestamp corresponding to a date d

Synopsis

DATE2UNIX(d)

Arguments

d: date

Description

The DATE2UNIX function translates a date into a Unix timestamp. A Unix timestamp is the number of seconds since midnight (0:00) of January 1st, 1970 GMT.

See also

UNIX2DATE, DATE.

DATEDIF

DATEDIF difference between dates

Synopsis

DATEDIF(start_date,end_date,interval)

Arguments

start_date: starting date serial value

end_date: ending date serial value

interval: counting unit

Description

DATEDIF returns the distance from start_date to end_date according to the unit specified by interval.

Note

If interval is "y", "m", or "d" then the distance is measured in complete years, months, or days respectively. If interval is "ym" or "yd" then the distance is measured in complete months or days, respectively, but excluding any difference in years. If interval is "md" then the distance is measured in complete days but excluding any difference in months.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

DAYS360.

DATEVALUE

DATEVALUE the date part of a date and time serial value

Synopsis

DATEVALUE(serial)

Arguments

serial: date and time serial value

Description

DATEVALUE returns the date serial value part of a date and time serial value.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

TIMEVALUE, DATE.

DAY

DAY the day-of-month part of a date serial value

Synopsis

DAY(date)

Arguments

date: date serial value

Description

The DAY function returns the day-of-month part of date.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

DATE, YEAR, MONTH.

DAYS

DAYS difference between dates in days

Synopsis

DAYS(end_date,start_date)

Arguments

end_date: ending date serial value

start_date: starting date serial value

Description

DAYS returns the positive or negative number of days from start_date to end_date.

OpenDocument Format (ODF) Compatibility

This function is OpenFormula compatible.

See also

DATEDIF.

DAYS360

DAYS360 days between dates

Synopsis

DAYS360(start_date,end_date,method)

Arguments

start_date: starting date serial value

end_date: ending date serial value

method: counting method

Description

DAYS360 returns the number of days from start_date to end_date.

Note

If method is 0, the default, the MS Excel (tm) US method will be used. This is a somewhat complicated industry standard method where the last day of February is considered to be the 30th day of the month, but only for start_date. If method is 1, the European method will be used. In this case, if the day of the month is 31 it will be considered as 30 If method is 2, a saner version of the US method is used in which both dates get the same February treatment.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

DATEDIF.

EASTERSUNDAY

EASTERSUNDAY Easter Sunday in the Gregorian calendar according to the Roman rite of the Christian Church

Synopsis

EASTERSUNDAY(year)

Arguments

year: year between 1582 and 9956, defaults to the year of the next Easter Sunday

Note

Two digit years are adjusted as elsewhere in Gnumeric. Dates before 1904 may also be prohibited.

OpenDocument Format (ODF) Compatibility

The 1-argument version of EASTERSUNDAY is compatible with OpenOffice for years after 1904. This function is not specified in ODF/OpenFormula.

See also

ASHWEDNESDAY.

EDATE

EDATE adjust a date by a number of months

Synopsis

EDATE(date,months)

Arguments

date: date serial value

months: signed number of months

Description

EDATE returns date moved forward or backward the number of months specified by months.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

DATE.

EOMONTH

EOMONTH end of month

Synopsis

EOMONTH(date,months)

Arguments

date: date serial value

months: signed number of months

Description

EOMONTH returns the date serial value of the end of the month specified by date adjusted forward or backward the number of months specified by months.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

EDATE.

GOODFRIDAY

GOODFRIDAY Good Friday in the Gregorian calendar according to the Roman rite of the Christian Church

Synopsis

GOODFRIDAY(year)

Arguments

year: year between 1582 and 9956, defaults to the year of the next Good Friday

Note

Two digit years are adjusted as elsewhere in Gnumeric. Dates before 1904 may also be prohibited.

See also

EASTERSUNDAY.

HDATE

HDATE Hebrew date

Synopsis

HDATE(year,month,day)

Arguments

year: Gregorian year of date, defaults to the current year

month: Gregorian month of year, defaults to the current month

day: Gregorian day of month, defaults to the current day

See also

HDATE_HEB, DATE.

HDATE_DAY

HDATE_DAY Hebrew day of Gregorian date

Synopsis

HDATE_DAY(year,month,day)

Arguments

year: Gregorian year of date, defaults to the current year

month: Gregorian month of year, defaults to the current month

day: Gregorian day of month, defaults to the current day

See also

HDATE_JULIAN.

HDATE_HEB

HDATE_HEB Hebrew date in Hebrew

Synopsis

HDATE_HEB(year,month,day)

Arguments

year: Gregorian year of date, defaults to the current year

month: Gregorian month of year, defaults to the current month

day: Gregorian day of month, defaults to the current day

See also

HDATE, DATE.

HDATE_JULIAN

HDATE_JULIAN Julian day number for given Gregorian date

Synopsis

HDATE_JULIAN(year,month,day)

Arguments

year: Gregorian year of date, defaults to the current year

month: Gregorian month of year, defaults to the current month

day: Gregorian day of month, defaults to the current day

See also

HDATE.

HDATE_MONTH

HDATE_MONTH Hebrew month of Gregorian date

Synopsis

HDATE_MONTH(year,month,day)

Arguments

year: Gregorian year of date, defaults to the current year

month: Gregorian month of year, defaults to the current month

day: Gregorian day of month, defaults to the current day

See also

HDATE_JULIAN.

HDATE_YEAR

HDATE_YEAR Hebrew year of Gregorian date

Synopsis

HDATE_YEAR(year,month,day)

Arguments

year: Gregorian year of date, defaults to the current year

month: Gregorian month of year, defaults to the current month

day: Gregorian day of month, defaults to the current day

See also

HDATE_JULIAN.

HOUR

HOUR compute hour part of fractional day

Synopsis

HOUR(time)

Arguments

time: time of day as fractional day

Description

The HOUR function computes the hour part of the fractional day given by time.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

TIME, MINUTE, SECOND.

ISOWEEKNUM

ISOWEEKNUM ISO week number

Synopsis

ISOWEEKNUM(date)

Arguments

date: date serial value

Description

ISOWEEKNUM calculates the week number according to the ISO 8601 standard. Weeks start on Mondays and week 1 contains the first Thursday of the year.

Note

January 1 of a year is sometimes in week 52 or 53 of the previous year. Similarly, December 31 is sometimes in week 1 of the following year.

See also

ISOYEAR, WEEKNUM.

ISOYEAR

ISOYEAR year corresponding to the ISO week number

Synopsis

ISOYEAR(date)

Arguments

date: date serial value

Description

ISOYEAR calculates the year to go with week number according to the ISO 8601 standard.

Note

January 1 of a year is sometimes in week 52 or 53 of the previous year. Similarly, December 31 is sometimes in week 1 of the following year.

See also

ISOWEEKNUM, YEAR.

MINUTE

MINUTE compute minute part of fractional day

Synopsis

MINUTE(time)

Arguments

time: time of day as fractional day

Description

The MINUTE function computes the minute part of the fractional day given by time.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

TIME, HOUR, SECOND.

MONTH

MONTH the month part of a date serial value

Synopsis

MONTH(date)

Arguments

date: date serial value

Description

The MONTH function returns the month part of date.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

DATE, YEAR, DAY.

NETWORKDAYS

NETWORKDAYS number of workdays in range

Synopsis

NETWORKDAYS(start_date,end_date,holidays,weekend)

Arguments

start_date: starting date serial value

end_date: ending date serial value

holidays: array of holidays

weekend: array of 0s and 1s, indicating whether a weekday (S, M, T, W, T, F, S) is on the weekend, defaults to {1,0,0,0,0,0,1}

Description

NETWORKDAYS calculates the number of days from start_date to end_date skipping weekends and holidays in the process.

Note

If an entry of weekend is non-zero, the corresponding weekday is not a work day.

Microsoft Excel Compatibility

This function is Excel compatible if the last argument is omitted.

OpenDocument Format (ODF) Compatibility

This function is OpenFormula compatible.

See also

WORKDAY.

NOW

NOW the date and time serial value of the current time

Synopsis

NOW()

Description

The NOW function returns the date and time serial value of the moment it is computed. Recomputing later will produce a different value.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

DATE.

ODF.TIME

ODF.TIME create a time serial value

Synopsis

ODF.TIME(hour,minute,second)

Arguments

hour: hour

minute: minute

second: second

Description

The ODF.TIME function computes the time given by hour, minute, and second as a fraction of a day.

Note

While the return value is automatically formatted to look like a time between 0:00 and 24:00, the underlying serial time value can be any number.

OpenDocument Format (ODF) Compatibility

This function is OpenFormula compatible.

See also

TIME, HOUR, MINUTE, SECOND.

PENTECOSTSUNDAY

PENTECOSTSUNDAY Pentecost Sunday in the Gregorian calendar according to the Roman rite of the Christian Church

Synopsis

PENTECOSTSUNDAY(year)

Arguments

year: year between 1582 and 9956, defaults to the year of the next Pentecost Sunday

Note

Two digit years are adjusted as elsewhere in Gnumeric. Dates before 1904 may also be prohibited.

See also

EASTERSUNDAY.

SECOND

SECOND compute seconds part of fractional day

Synopsis

SECOND(time)

Arguments

time: time of day as fractional day

Description

The SECOND function computes the seconds part of the fractional day given by time.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

TIME, HOUR, MINUTE.

TIME

TIME create a time serial value

Synopsis

TIME(hour,minute,second)

Arguments

hour: hour of the day

minute: minute within the hour

second: second within the minute

Description

The TIME function computes the fractional day after midnight at the time given by hour, minute, and second.

Note

While the return value is automatically formatted to look like a time between 0:00 and 24:00, the underlying serial time value is a number between 0 and 1. If any of hour, minute, and second is negative, #NUM! is returned

Microsoft Excel Compatibility

This function is Excel compatible.

See also

ODF.TIME, HOUR, MINUTE, SECOND.

TIMEVALUE

TIMEVALUE the time part of a date and time serial value

Synopsis

TIMEVALUE(serial)

Arguments

serial: date and time serial value

Description

TIMEVALUE returns the time-of-day part of a date and time serial value.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

DATEVALUE, TIME.

TODAY

TODAY the date serial value of today

Synopsis

TODAY()

Description

The TODAY function returns the date serial value of the day it is computed. Recomputing on a later date will produce a different value.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

DATE.

UNIX2DATE

UNIX2DATE date value corresponding to the Unix timestamp t

Synopsis

UNIX2DATE(t)

Arguments

t: Unix time stamp

Description

The UNIX2DATE function translates Unix timestamps into the corresponding date. A Unix timestamp is the number of seconds since midnight (0:00) of January 1st, 1970 GMT.

See also

DATE2UNIX, DATE.

WEEKDAY

WEEKDAY day-of-week

Synopsis

WEEKDAY(date,method)

Arguments

date: date serial value

method: numbering system, defaults to 1

Description

The WEEKDAY function returns the day-of-week of date. The value of method determines how days are numbered; it defaults to 1.

Note

If method is 1, then Sunday is 1, Monday is 2, etc. If method is 2, then Monday is 1, Tuesday is 2, etc. If method is 3, then Monday is 0, Tuesday is 1, etc. If method is 11, then Monday is 1, Tuesday is 2, etc. If method is 12, then Tuesday is 1, Wednesday is 2, etc. If method is 13, then Wednesday is 1, Thursday is 2, etc. If method is 14, then Thursday is 1, Friday is 2, etc. If method is 15, then Friday is 1, Saturday is 2, etc. If method is 16, then Saturday is 1, Sunday is 2, etc. If method is 17, then Sunday is 1, Monday is 2, etc.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

DATE, ISOWEEKNUM.

WEEKNUM

WEEKNUM week number

Synopsis

WEEKNUM(date,method)

Arguments

date: date serial value

method: numbering system, defaults to 1

Description

WEEKNUM calculates the week number according to method which defaults to 1.

Note

If method is 1, then weeks start on Sundays and January 1 is in week 1. If method is 2, then weeks start on Mondays and January 1 is in week 1. If method is 150, then the ISO 8601 numbering is used.

See also

ISOWEEKNUM.

WORKDAY

WORKDAY add working days

Synopsis

WORKDAY(date,days,holidays,weekend)

Arguments

date: date serial value

days: number of days to add

holidays: array of holidays

weekend: array of 0s and 1s, indicating whether a weekday (S, M, T, W, T, F, S) is on the weekend, defaults to {1,0,0,0,0,0,1}

Description

WORKDAY adjusts date by days skipping over weekends and holidays in the process.

Note

days may be negative. If an entry of weekend is non-zero, the corresponding weekday is not a work day.

Microsoft Excel Compatibility

This function is Excel compatible if the last argument is omitted.

OpenDocument Format (ODF) Compatibility

This function is OpenFormula compatible.

See also

NETWORKDAYS.

YEAR

YEAR the year part of a date serial value

Synopsis

YEAR(date)

Arguments

date: date serial value

Description

The YEAR function returns the year part of date.

Microsoft Excel Compatibility

This function is Excel compatible.

See also

DATE, MONTH, DAY.

YEARFRAC

YEARFRAC fractional number of years between dates

Synopsis

YEARFRAC(start_date,end_date,basis)

Arguments

start_date: starting date serial value

end_date: ending date serial value

basis: calendar basis

Description

YEARFRAC calculates the number of days from start_date to end_date according to the calendar specified by basis, which defaults to 0, and expresses the result as a fractional number of years.

Note

If basis is 0, then the US 30/360 method is used. If basis is 1, then actual number of days is used. If basis is 2, then actual number of days is used within a month, but years are considered only 360 days. If basis is 3, then actual number of days is used within a month, but years are always considered 365 days. If basis is 4, then the European 30/360 method is used.

See also

DATE.