Last Updated : 28 Sep, 2020
In this article, you will see how you can use the current_date function and you will see both formats in the string and numeric respectively.
CURRENT_DATE :In this function, you will see how you can use the current date function. In MSQSSL, format of date '‘YYYY-MM-DD’(in string) format or YYYYMMDD'(in numeric) format.
Syntax :CURRENT_DATE()Parameter :
This function does not accept any parameter.
Returns -It returns the current date.
Example-1 :CURRENT_DATE() function to find the present date.
SELECT CURRENT_DATE() AS CURR_DATE;Output : Example-2 :
CURRENT_DATE() function to find the present date in YYYYMMDD format.
SELECT CURRENT_DATE()+0 AS CURR_DATE;Output : Example-3 :
Adding 3 Days to CURRENT_DATE() function to find the next date.
SELECT CURRENT_DATE()+3 AS NEXT_DATE;Output :
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4