Date & Time
AddDays
Function | Parameters | Return value |
---|---|---|
AddDays |
DateTime date, double value |
DateTime |
Adds the specified number of days ("value") to the "date" date and returns a new date.
Example:
AddDays(#7/29/2009#, 1) = #7/30/2009#
AddHours
Function | Parameters | Return value |
---|---|---|
AddHours |
DateTime date, double value |
DateTime |
Adds the specified number of hours ("value") to the "date" date and returns a new date.
Example:
AddHours(#7/29/2009 1:30#, 1) = #7/29/2009 2:30#
AddMinutes
Function | Parameters | Return value |
---|---|---|
AddMinutes |
DateTime date, double value |
DateTime |
Adds the specified number of minutes ("value") to the "date" date and returns a new date.
Example:
AddMinutes(#7/29/2009 1:30#, 1) = #7/29/2009 1:31#
AddMonths
Function | Parameters | Return value |
---|---|---|
AddMonths |
DateTime date, int value |
DateTime |
Adds the specified number of months ("value") to the "date" date and returns a new date.
Example:
AddMonths(#7/29/2009#, 1) = #8/29/2009#
AddSeconds
Function | Parameters | Return value |
---|---|---|
AddSeconds |
DateTime date, double value |
DateTime |
Adds the specified number of seconds ("value") to the "date" date and returns a new date.
Example:
AddSeconds(#7/29/2009 1:30:01#, 1) = #7/29/2009 1:30:02#
AddYears
Function | Parameters | Return value |
---|---|---|
AddYears |
DateTime date, int value |
DateTime |
Adds the specified number of years ("value") to the "date" date and returns a new date.
Example:
AddYears(#7/29/2009#, 1) = #7/29/2010#
DateDiff
Function | Parameters | Return value |
---|---|---|
DateDiff |
DateTime date1, DateTime date2 |
TimeSpan |
Returns the interval (number of days, hours, minutes, seconds) between two dates.
Example:
DateDiff(#1/2/2009#, #1/1/2009#) = 1.00:00:00
DateSerial
Function | Parameters | Return value |
---|---|---|
DateSerial |
int year, int month, int day |
DateTime |
Creates a new DateTime value from the specified year, month and day.
Example:
DateSerial(2009, 7, 29) = #7/29/2009#
Day
Function | Parameters | Return value |
---|---|---|
Day |
DateTime date |
int |
Gets the day of the month (1-31) represented by the specified date.
Example:
Day(#7/29/2009#) = 29
DayOfWeek
Function | Parameters | Return value |
---|---|---|
DayOfWeek |
DateTime date |
string |
Gets the localized name of the day of the week represented by the specified date.
Example:
DayOfWeek(#7/29/2009#) = "wednesday"
DayOfYear
Function | Parameters | Return value |
---|---|---|
DayOfYear |
DateTime date |
int |
Gets the day of the year (1-365) represented by the specified date.
Example:
DayOfYear(#7/29/2009#) = 210
DaysInMonth
Function | Parameters | Return value |
---|---|---|
DaysInMonth |
int year, int month |
int |
Returns the number of days in the specified month and year.
Example:
DaysInMonth(2009, 7) = 31
Hour
Function | Parameters | Return value |
---|---|---|
Hour |
DateTime date |
int |
Gets the hour component (0-23) represented by the specified date.
Example:
Hour(#7/29/2009 1:30#) = 1
Minute
Function | Parameters | Return value |
---|---|---|
Minute |
DateTime date |
int |
Gets the minute component (0-59) represented by the specified date.
Example:
Minute(#7/29/2009 1:30#) = 30
Month
Function | Parameters | Return value |
---|---|---|
Month |
DateTime date |
int |
Gets the month component (1-12) represented by the specified date.
Example:
Month(#7/29/2009#) = 7
MonthName
Function | Parameters | Return value |
---|---|---|
MonthName |
int month |
string |
Gets the localized name of the specified month (1-12).
Example:
MonthName(1) = "January"
Second
Function | Parameters | Return value |
---|---|---|
Second |
DateTime date |
int |
Gets the seconds component (0-59) represented by the specified date.
Example:
Second(#7/29/2009 1:30:05#) = 5
Year
Function | Parameters | Return value |
---|---|---|
Year |
DateTime date |
int |
Gets the year component represented by the specified date.
Example:
Year(#7/29/2009#) = 2009