<< Click to Display Table of Contents >> Date Function |
![]() ![]() ![]() |
Function |
Description |
Return type |
Example |
---|---|---|---|
date |
Return to the serial number of specific date |
date |
date(int year, int month, int day) |
datevalue |
Convert text format date to serial number, initial date is 1900-1-1 |
int |
datevalue(Object dateobj) |
dateTrunc |
Truncates the specified date by the time dimension specified by datepart, returning a new date |
date |
dateTrunc('month',date(2019,08,08)) |
day |
Convert the serial number to the date of the month |
int |
day(Object dateobj) |
dayofyear |
Returns the number of days in a year |
int |
dayofyear(Object dateobj) |
days360 |
Calculate the number of days between two days on a 360-day basis |
int |
days360(Object startobj, Object endobj, Object basis) |
edate |
Returns the serial number of the date used to indicate the number of months before or after the start date |
object |
edate(Object dateobj, int number) |
eomonth |
Returns the serial number of the last day of the month before or after the specified number of months |
object |
eomonth(Object dateobj, int monthNo) |
hour |
Convert the serial number to hours |
int |
hour(Object dateobj) |
minute |
Convert the serial number to minutes |
int |
minute(Object dateobj) |
month |
Convert the serial number to month |
int |
month(Object dateobj) |
monthname |
The month of the return date |
string |
monthname(Object dateObj) |
networkdays |
Returns the total number of working days during two days |
int |
networkdays(Object startobj, Object endobj, Object holidaysObj) |
now |
Returns the serial number of the current date and time |
date |
now() |
quarter |
Returns the quarter of the date object [1,4] |
int |
quarter(Object date) |
second |
Convert the serial number to second |
int |
second(Object dateobj) |
time |
Return the serial number for a specific time |
double |
time(int hour, int minute, int second) |
timevalue |
Convert text format time to serial number |
double |
timevalue(Object dateobj) |
today |
Returns the serial number of today's date |
date |
today() |
weekday |
Convert the serial number to week |
int |
weekday(Object dateobj, Object type) |
weekdayname |
Returns the current date of the week |
object |
weekdayname(Object dateObject) |
weeknum |
Convert the serial number to a number that represents the week of the week for the week |
int
|
weeknum(Object dateobj, Object type) |
workday |
Get dates before or after the end of the matching workday |
object |
workday(Object startobj, int days, Object holidaysObj) |
year |
Convert the serial number to year |
int |
year(Object dateobj) |
yearfrac |
Returns the percentage of days between start_date and end_date in the full year. |
double |
yearfrac(Object start, Object end, Object basis) |