SQL Server Date Data Types

SQL Server Date Data Types

As a senior database developer, I often receive requirements to utilize the date data type in SQL Server. In this comprehensive article, I’ll walk you through everything you need to know about SQL Server date data types. SQL Server Date Data Types Why Date Data Types in SQL Server Before diving into the specifics, let’s … Read more

SQL Server Date vs DateTime

SQL Server Date vs DateTime

As a senior developer working with SQL Server, I have frequently used date and datetime data types. In this article, I’ll walk you through everything you need to know about SQL Server’s date and time data types, with a special focus on the differences between the DATE and DATETIME data types. SQL Server Date vs … Read more

SQL Server Date Between

SQL Server Date Between

In this article, I’ll walk you through everything you need to know about working with date ranges in SQL Server, with a specific focus on the BETWEEN operator. SQL Server Date Between Before diving into specific techniques, it’s essential to understand how SQL Server handles dates. SQL Server stores dates in a standardized internal format, … Read more

SQL Server Date Formatting

SQL Server Date Formatting

In this comprehensive article, I’ll walk you through everything you need to know about SQL Server date formatting—from basic conversions to advanced techniques, followed by the best practices. SQL Server Date Formatting Before diving into the specifics, let’s understand why date formatting is so crucial. The United States follows the MM/DD/YYYY format (06/10/2025), whereas many … Read more

SQL Server Add Time To Date

SQL Server Add Time To Date

Most of the time, I was required to add the time to the date, being a senior SQL Server resource. In this comprehensive article, I’ll walk you through multiple approaches on how to add time to a date in SQL Server. SQL Server Add Time To Date Before diving into specific approaches, it’s important to … Read more

SQL Server Greater Than Date

SQL Server Greater Than Date

In this comprehensive article, I’ll cover everything you need to know about using greater than operators with dates in SQL Server, from basic syntax to advanced techniques. SQL Server Greater Than Date Before diving into specific techniques, it’s essential to understand how SQL Server handles date comparisons. Unlike some programming languages, where dates require special … Read more

SQL Server Date In Where Clause

SQL Server Date In Where Clause

In this comprehensive article, I’ll cover everything you need to know about using dates in SQL Server WHERE clauses, from basic syntax to advanced techniques. SQL Server Date In Where Clause The first challenge when working with dates in SQL Server is understanding the available data types. Common Date Data Types in SQL Server SQL … Read more

‘EXTRACT’ is not a recognized built-in function name.

'EXTRACT' is not a recognized built-in function name.

Recently, I was working on a requirement to extract the year from a date in SQL Server. After executing the SQL query, I got this error. ‘EXTRACT’ is not a recognized built-in function name. I was executing the following query. After executing the above query, I got this error as shown in the screenshot below. … Read more

SQL Server Get Month From Date

SQL Server Get Month From Date

In this comprehensive article, I’ll provide real-time examples of multiple approaches to extracting the month from a date in SQL Server. This is one of the requirements that I recently got for one of my applications. SQL Server Get Month From Date Let us discuss all the possible approaches individually. Approach 1: Using the MONTH() … Read more