Categories
General

SMALLDATETIMEFROMPARTS function in SQL Server Denali

Today I’m going to give you a short demo on the new date time function in SQL Server Denali. It’s SMALLDATETIMEFROMPARTS function, are you able to get the things from naming convention. Yep! you are right, this function will return small datetime value with the parts of data being supplied to the function. I hope previously we did this with convert or cast function.

Categories
General

Finding END of Month in SQL Server Denali Using EOMONTH function

Today we are going to see a new datetime function that’s introduced with SQL Server Denali. This function is expected by many of the developers, this function will let you know the last date of a month. It’s EOMONTH(), you can pass the date as input , it will give you the end date of that month.

Categories
General

Formatting Data in SQL Server Denali using FORMAT function

Today we are going to see another new function introduced in SQL Server Denali. It’s nothing but the FORMAT function.This will be very useful feature to format any data in SQL Server. In previous versions we will be using CONVERT function to do some styling in date time etc. However in Denali for sure this function is going to replace the styling parameter in CONVERT function. You can use this function to format data as you want.

Categories
General

Concatenation in SQL Server Denali Denali using CONCAT function

Microsoft introduced new function for string concatenation. CONCAT() is the function which is introduced in SQL Server Denali for concatenation which will take input and return the output as a single string.

Categories
General

DATETIMEOFFSETFROMPARTS function – SQL Server Denali

This function is also new to SQL Server denali however this function got some more arguments compared to DATETIMEFROMPARTS function. I’m not sure how frequently we will use this as it’s more precise to give you the values.  If the arguments are not valid then an error is raised or if the argument is NULL then it will return a NULL value.