date
($year as xs:integer, $month as xs:integer, $day as xs:integer) as xs:date?
Constructs a date given the hours, months and days. |
day
($date as xs:date) as xs:integer?
Returns the day of a $date, represented by a serial number. |
days360
($start_date as xs:date, $end_date as xs:date) as xs:integer
Returns the number of days between two dates based on a 360-day year. |
days360
($start_date as xs:date, $end_date as xs:date, $method as xs:boolean) as xs:integer
Returns the number of days between two dates based on a 360-day year. |
hour
($time as xs:time) as xs:integer?
Returns the hour of a time value. |
minute
($time as xs:time) as xs:integer?
Returns the minutes of a time value. |
month
($date as xs:date) as xs:integer?
Returns the month of a $date. |
networkdays
($start_date as xs:date, $end_date as xs:date) as xs:integer*
Returns the number of whole working days between $start_date and $end_date. |
networkdays
($start_date as xs:date, $end_date as xs:date, $holidays as xs:date*) as xs:integer*
Returns the number of whole working days between $start_date and $end_date. |
now
() as xs:dateTime?
Returns the current date and time. |
second
($time as xs:time) as xs:decimal?
Returns the seconds of a $time value. |
time
($hour as xs:integer, $minute as xs:integer, $second as xs:integer) as xs:time?
Constructs a time given the hours, minutes and seconds. |
today
() as xs:date?
Returns the current date. |
weekday
($date as xs:date) as xs:integer?
Returns the day of the week corresponding to a $date. |
weekday
($date as xs:date, $return_type as xs:integer) as xs:integer?
Returns the day of the week corresponding to a $date depending on $return_type. |
year
($date as xs:date) as xs:integer?
Returns the year corresponding to a date. |
declare function excel-datetime:date($year as xs:integer, $month as xs:integer, $day as xs:integer) as xs:date?
declare function excel-datetime:day($date as xs:date) as xs:integer?
declare function excel-datetime:days360($start_date as xs:date, $end_date as xs:date) as xs:integer
Use this function to help compute payments if your accounting system is based on twelve 30-day months.
The metod used is U.S. (NASD). If the starting date is the last day of a month, it becomes equal to the 30th of the same month.
If the ending date is the last day of a month and the starting date is earlier than the 30th of a month, the ending date becomes equal to the 1st of the next month; otherwise the ending date becomes equal to the 30th of the same month.
declare function excel-datetime:days360($start_date as xs:date, $end_date as xs:date, $method as xs:boolean) as xs:integer
The European Method (30E/360)
- If either date A or B falls on the 31st of the month, that date will be changed to the 30th;
- Where date B falls on the last day of February, the actual date B will be used.
The US/NASD Method (30US/360)
- If both date A and B fall on the last day of February, then date B will be changed to the 30th.
- If date A falls on the 31st of a month or last day of February, then date A will be changed to the 30th.
- If date A falls on the 30th of a month after applying (2) above and date B falls on the 31st of a month, then date B will be changed to the 30th.
declare function excel-datetime:hour($time as xs:time) as xs:integer?
declare function excel-datetime:minute($time as xs:time) as xs:integer?
declare function excel-datetime:month($date as xs:date) as xs:integer?
declare function excel-datetime:networkdays($start_date as xs:date, $end_date as xs:date) as xs:integer*
Working days exclude weekends and any dates identified in holidays.
Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term.
declare function excel-datetime:networkdays($start_date as xs:date, $end_date as xs:date, $holidays as xs:date*) as xs:integer*
Working days exclude weekends and any dates identified in holidays.
Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term.
declare function excel-datetime:now() as xs:dateTime?
declare function excel-datetime:second($time as xs:time) as xs:decimal?
declare function excel-datetime:time($hour as xs:integer, $minute as xs:integer, $second as xs:integer) as xs:time?
declare function excel-datetime:today() as xs:date?
declare function excel-datetime:weekday($date as xs:date) as xs:integer?
declare function excel-datetime:weekday($date as xs:date, $return_type as xs:integer) as xs:integer?
declare function excel-datetime:year($date as xs:date) as xs:integer?