Hi,
I have a simple statement below, which I expect to return values quarterly. But with the given dates below it returns 1 and I expect 0 because there is no quarter passed between them. Can anyone suggest what's wrong with this:
DECLARE @startDate AS DATE = '20090518' DECLARE @endDate AS DATE = '20090701' SELECT DATEDIFF(quarter, @startDate, @endDate)
I am using British format, but that shouldn't affect as the above date declaration should handle that correctly.
Thanks