Tips
Determine SQL Server Date and Time with DATEPART and DATENAME Functions
As with most applications and databases nowadays, our application retrieves data that has at least one date in the record. There are times when we need to return the name of day or retrieve the month or day from the data.
What functions does SQL Server offer to assist in this area? Check out
this tip to learn about the SQL Server DatePart and DateName functions.
New SQL Server Function to Format Dates
SQL Server 2008 and earlier versions used the CONVERT functions to handle date formatting. In this tip, Date and Time Conversions Using SQL Server, we have a list of the available examples on how to use the CONVERT function to handle different date formats. As you may notice, this function is not very flexible and we have limited date formats. In SQL Server 2012 and future versions, a new function FORMAT has been introduced which is much easier to use. This article shows different examples of using this new function.
Work around for calculating age using the SQL Server DateDiff function
Have you ever wanted to compute age, but the results from the DATEDIFF function seemed to be wrong some of the time? In this tip we cover why the DATEDIFF function does not always reliably compute age?
Top 10
Work around for calculating age using the SQL Server DateDiff function
Have you ever wanted to compute age, but the results from the DATEDIFF function seemed to be wrong some of the time? In this tip we cover why the DATEDIFF function does not always reliably compute age?
New SQL Server Function to Format Dates
SQL Server 2008 and earlier versions used the CONVERT functions to handle date formatting. In this tip, Date and Time Conversions Using SQL Server, we have a list of the available examples on how to use the CONVERT function to handle different date formats. As you may notice, this function is not very flexible and we have limited date formats. In SQL Server 2012 and future versions, a new function FORMAT has been introduced which is much easier to use. This article shows different examples of using this new function.
Determine SQL Server Date and Time with DATEPART and DATENAME Functions
As with most applications and databases nowadays, our application retrieves data that has at least one date in the record. There are times when we need to return the name of day or retrieve the month or day from the data.
What functions does SQL Server offer to assist in this area? Check out
this tip to learn about the SQL Server DatePart and DateName functions.
Last 10
Work around for calculating age using the SQL Server DateDiff function
Have you ever wanted to compute age, but the results from the DATEDIFF function seemed to be wrong some of the time? In this tip we cover why the DATEDIFF function does not always reliably compute age?
New SQL Server Function to Format Dates
SQL Server 2008 and earlier versions used the CONVERT functions to handle date formatting. In this tip, Date and Time Conversions Using SQL Server, we have a list of the available examples on how to use the CONVERT function to handle different date formats. As you may notice, this function is not very flexible and we have limited date formats. In SQL Server 2012 and future versions, a new function FORMAT has been introduced which is much easier to use. This article shows different examples of using this new function.
Determine SQL Server Date and Time with DATEPART and DATENAME Functions
As with most applications and databases nowadays, our application retrieves data that has at least one date in the record. There are times when we need to return the name of day or retrieve the month or day from the data.
What functions does SQL Server offer to assist in this area? Check out
this tip to learn about the SQL Server DatePart and DateName functions.