Select records from start of month to current date

后端 未结 5 1366
别那么骄傲
别那么骄傲 2021-01-25 08:16

I\'m trying to select records that were added to the database between the start of the current month and the current day - I more or less know how to get records from the curren

5条回答
  •  迷失自我
    2021-01-25 08:52

    select *
    from YourTable
    where DateCol >= dateadd(month, datediff(month, 0, getdate()), 0)
    

提交回复
热议问题