Viewing 15 posts - 361 through 375 (of 1,468 total)
Take a look at the SQL CONVERT function for formatting the dates for display.
But PLEASE PLEASE PLEASE do not save the dates as varchar. You will be opening yourself...
I like the simplicity of finding the February 29 dates, then subtracting that DesNorton posted. But it didn't calculate correctly when I used the start date of 01/01/2019 end...
This can be made more dynamic with a function that gets the FEB29 days
CREATE FUNCTION dbo.GetLeapYearDates(@Date1 AS date, @Date2 AS date)
RETURNS TABLE WITH SCHEMABINDING
AS
RETURN
WITH
...
Viewing 15 posts - 361 through 375 (of 1,468 total)