How to Get the Current Date in SQL Server Database: MS SQL Server Operators: CAST() GETDATE() Table of Contents Problem Solution Discussion Problem You’d like to get the current date in an SQL Server database. Solution SELECT CAST(GETDATE() AS DATE); Result: 2021-03-11 Discussion GETDATE() is a function that returns the current date and time. Arguments are not required. If you use just the GETDATE() function, you will get: 2021-03-11 22:28:17.280 If you want to get only the date and not the time, you need to use another function, CAST(). In the parentheses, specify the value, expression, or column you want to convert from, AS, then finally the type of value you want to get (in our solution, DATE). Recommended courses: Common Functions in SQL Server Recommended articles: SQL Server Cheat Sheet Top 29 SQL Server Interview Questions How to Learn T-SQL Querying Learning SQL? 14 Ways to Practice SQL Online 15 SQL Server Practice Exercises with Solutions See also: How to Get Current Date & Time in T-SQL (No Time Zone) How to Get the Current Date (Without Time) in T-SQL Subscribe to our newsletter Join our monthly newsletter to be notified about the latest posts. Email address How Do You Write a SELECT Statement in SQL? What Is a Foreign Key in SQL? Enumerate and Explain All the Basic Elements of an SQL Query