SQL query to select dates between two dates

后端 未结 22 1812
囚心锁ツ
囚心锁ツ 2020-11-22 09:10

I have a start_date and end_date. I want to get the list of dates in between these two dates. Can anyone help me pointing the mistake in my query.<

22条回答
  •  礼貌的吻别
    2020-11-22 09:52

    if its date in 24 hours and start in morning and end in the night should add something like :

    declare @Approval_date datetime
    set @Approval_date =getdate()
    Approval_date between @Approval_date +' 00:00:00.000' and @Approval_date +' 23:59:59.999'
    

提交回复
热议问题