SQL Server Convert Datetime to Date

SQL Server Convert Datetime to Date using CAST Function

In this SQL Server tutorial, you will learn about SQL Server Convert Datetime to date, where you will understand the why to convert the datetime value to date. Then, you will introduced to some function in SQL Server that allows you to convert the given datetime value to date, such as CONVERT(), CAST() and TRY_CONVERT(). … Read more

SQL Server DATETRUNC Function

SQL Server DateTrunc Function Truncating the Year

In this SQL Server tutorial, you will learn about the SQL Server DATETRUNC function, where you will be truncating the part of the given date. After that, you will apply the DATETRUNC() function on the different date string literal and truncate the date to year, month, day, minutes, etc. Ultimately, you will learn to use … Read more

STRING_SPLIT Function in SQL Server

STRING_SPLIT Function in SQL Server

In this SQL Server tutorial, you will learn the STRING_SPLIT function in SQL Server to divide the string based on the specified character. You will understand the benefits of using the STRING_SPLIT() function in SQL Server with its syntax. Then, you will see how the STRING_SPLIT() function works with the help of some examples. After … Read more

SQL Server Remove Character From String

SQL Server Remove Character From String using Replace Function with Special Character

In this SQL Server tutorial, you will understand SQL Server remove character from string. You will learn about the reasons to remove the character from a string, then functions such as REPLACE(), LTRIM(), and RTRIM() that you can use to remove the character from the given string. SQL Server Remove Character From String Removing the … Read more

GROUPING in SQL Server

GROUPING in SQL Server

In this SQL Server tutorial, you will understand GROUPING in SQL Server, where you will learn the syntax of the GROUPING() function and its definition. Then, using an example, you will apply the GROUPING() function on the table column. GROUPING in SQL Server When you perform the aggregation on the table rows with the GROUP … Read more

How to use MIN Function in SQL Server

MIN() Function in SQL Server

In this SQL Server tutorial, you will learn about the MIN function in SQL Server, which is the aggregate function that can find the minimum value. Then, you will understand the syntax of the MIN() function and its definition. Afterwards, you will learn to use the MIN() function with DATE and VARCHAR data types. Finally, … Read more

How to use MAX Function in SQL Server

MAX Function in SQL Server

In this SQL Server tutorial, you will learn about the MAX function in SQL Server, which is the aggregate function that can find the maximum value. Then, you will understand the syntax of the MAX() function and its definition. Afterwards, you will learn to use the MAX() function with DATE and VARCHAR data types. Finally, … Read more

SQL Server STRING_AGG Function

SQL Server STRING_AGG Function

In this SQL Server tutorial, you will learn about the SQL Server STRIN_AGG function to add multiple values into a single string. Also, you will understand the scenarios where you can use the STRING_AGG() function. Then syntax of the STRING_AGG() function. Finally, you will learn how to use the STRING_AGG() function with null values and … Read more

TRY_CONVERT Function in SQL Server

TRY_CONVERT Function in SQL Server Datetime to Date

In this SQL Server tutorial, you will learn about the TRY_CONVERT function in SQL Server that allows you to change the data type of the given value. You will understand the syntax of the TRY_CONVERT() function and use the function to convert the string to integer, integer to string, etc. Also, you will change the … Read more

DATEPART Function in SQL Server

DATEPART function in SQL Server Extracting Year Part of the Date

In this SQL Server tutorial, you will learn the DATEPART function in SQL Server. You will understand the use cases of the DATEPART() function and its syntax. After that, you will learn how to get the specific parts such as day, month, and year from a given date. Then, you will also learn how to … Read more