;

Tags: SQL DateTime Functions Articles


How to Get the Current Time Zone of the Server in SQL Server.

Tutorialsrack 05/11/2021 SQL Server

In this article, you will learn how to get the current timezone of the server in SQL Server. A very common question we developers often encounter is what is the current Timezone of the server where the SQL Server is installed. Here are the two examples to get the current timezone of the server in SQL Server.

Read More..

How to Convert a Month Name to the Month Number in SQL Server

Tutorialsrack 06/06/2021 SQL SQL Server

In this article, you’ll learn how to convert a month name to the month number in SQL Server. In SQL Server, there are no built-in functions to get a month number from a month name. So, here, you can use the MONTH()andDATEPART() functions to convert a month name to its corresponding month number.

Read More..

How to Get or Return the ISO Week Number from a Date in SQL Server

Tutorialsrack 25/02/2021 SQL SQL Server

In this article, you’ll learn how to get or return the ISO week number from a date in SQL Server. In this article, we use the two ways to get the ISO week number from a date. One is the DATEPART() function and the second one is a user-defined function.

Read More..

3 Ways to Get or Extract the Month From a Date in SQL Server

Tutorialsrack 22/02/2021 SQL SQL Server

In this article, you will learn how to get or extract the months from a date in SQL Server(T-SQL). Here in this article, we are doing this in 3 ways to extract the month from a date. We are using the MONTH(), DATEPART(), FORMAT() functions to get or extract the month from a date in SQL Server.

Read More..

How to Add and Subtract Dates from DateTime in MySQL

Tutorialsrack 24/05/2020 SQL MySQL

In this article, you will learn how to add or subtract years, months, weeks, days, hours, minutes, seconds, microseconds to a DateTime in MySQL. DateTime manipulation is the most common scenario is when we fetching data from the database or storing data in a database. Here, we used the MySQL built-in DateTime functions: ADDDATE(), DATE_ADD(), DATE_SUB(), and add and subtract dates without using any built-in function. 

Read More..

How to Add and Subtract Dates from DateTime Using DATEADD() Function in SQL Server

Tutorialsrack 23/05/2020 SQL SQL Server

In this article, you will learn how to add and subtract years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds from DateTime in the SQL server. DateTime manipulation is the most common scenario is when we fetching data from the database or storing data in a database. Here, in this article, we will use the SQL server built-in DATEADD() function to add or subtract the days from the specific date.

Read More..
Recent Posts
Tags