1. Date() Function :
Date() function returns the current date of the system. In this function, no parameter will be passed and it will return the current date.
Syntax :
Date()
Example :
SELECT Date() AS CurrentDate;
Output –
| CurrentDate |
|---|
| 9/2/2020 |
2. DateAdd() Function :
DateAdd() function will add the time interval and date to the given date and return it. In this function, the first parameter will be the interval notation and second parameter will be the number that will be added and the third parameter will be the date,
| Interval | Description |
|---|---|
| yyyy | Year |
| q | Quarter |
| m | month |
| y | Day of the year |
| d | Day |
| w | Weekday |
| ww | Week |
| h | hour |
| n | Minute |
| s | Second |
Syntax :
DateAdd(interval, number, date)
Example-1 :
SELECT DateAdd("yyyy", 3, #02/09/2020#);
Output –
| Output : |
|---|
| 2/9/2023 |
Example-2 :
SELECT DateAdd("m", 3, Date()) As Date;
Output –
| Output : |
|---|
| 12/2/2020 |
Recommended Posts:
- Hex() and Oct() Function Function in MS Access
- SLN() and SYD() Function Function in MS Access
- DDB () and FV() Function Function in MS Access
- Val() and Sum() Function in MS Access
- Sgn() and Sqr() function in MS Access
- StrConv() and StrReverse() Function in MS Access
- Chr() and Asc() Function in MS Access
- InStr() and InstrRev() Function in MS Access
- LCase() and UCase () Function in MS Access
- Str() and StrComp() Function in MS Access
- Replace() and Space() Function in MS Access
- Exp() and Count() Function in MS Access
- Mid() and Len() Function in MS Access
- LTrim() and RTrim() Function in MS Access
- Left() and Right() Function in MS Access
- Rnd() and Round Function in MS Access
- Max() and Min() function in MS Access
- Fix() and Format() Function in MS Access
- Second() and Time() Function in MS Access
- MonthName() and Now() function in MS Access
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

