I have a Stored Procedure that takes Start Date and End Dates. So the Start Date must start from 1/1/2018. I want to make the Start Date as Dynamic- meaning when we are in 2019, the start Date will pick up 1/1/2019 and End Date is always Today's date. I appreciate for any help.
StartDate: 1/1/2018
EndDate: TodaysDate
Thanks
you can get it in sql itself like this
SELECT
DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), 0) AS StartOfYear,
GETDATE() AS Today
GETDATE include time? - mjwillsNo, it does not include time. GETDATE does include time. - mjwills
postgresql,oracle,sql-server,db2, ... - a_horse_with_no_name