How many of us use some sort of date or datetime function when working with SQL Server? I cannot think of a single developer who would ever say they don’t work with datetime conversions in their application. Almost every application needs some manipulation of datetime datatypes. There are a number of pitfalls that can get into which we might not be aware. Here is a simple blog: Quiz with DATEADD Function that I would love to hear your views on what the output would be:
SQL SERVER – The Easy Functions of SQL Server – Notes from the Field #062
[Note from Pinal]: In this episode of the Notes from the Field series database expert Kathi Kellenberger explains about easy and amazing functions of SQL Server. Kathi is an amazing instructor, she was the SQL author I have read in my early career. The reason, I love SQL Server because her writing has…
Read MoreSQL SERVER – List the Name of the Months Between Date Ranges – Part 2
Last week I wrote a blog post about SQL SERVER – List the Name of the Months Between Date Ranges. It was written in the response to the question – How to list the name of the months between two date ranges? In the original blog post, I made a small error, hence I corrected that in the follow up blog post. Thanks to Sanjay Monpara for helping me correct the error. There are some amazing comments received in the original blog posts.
SQL SERVER – List the Name of the Months Between Date Ranges – Correction
Earlier I wrote a blog post about SQL SERVER – List the Name of the Months Between Date Ranges. It was written in the response to the question – How to list the name of the months between two date ranges? When I wrote the blog post, there was a small…
Read MoreSQL SERVER – List the Name of the Months Between Date Ranges
Here is another interesting question, I received the other day. “How to list the name of the months between two date ranges?” Very interesting question. I had no script ready for it so I asked my friend who used to my co-worker earlier and he has sent me the script…
Read MoreSQL SERVER – Finding if Current Week is Odd or Even – Script
Here is an interesting question I received from my friend who is working in Bank as a DBA. “Pinal, We have a requirement in bank that every 2nd and 4th week we keep more cash in our bank where as we can keep less cash on other weeks. I want…
Read MoreSQL SERVER – Convert Seconds to Hour : Minute : Seconds Format
Here is another question I received via email. “Hi Pinal, I have a unique requirement. We measure time spent on any webpage in measure of seconds. I recently have to build a report over it and I did few summations based on group of web pages. Now my manager wants…
Read More