I've a table product(prodID,stock,createdDate type DATETIME )
Wanna find all record from table for the current date
Thanks
I've a table product(prodID,stock,createdDate type DATETIME )
Wanna find all record from table for the current date
Thanks
This rounds to the current date:
...
WHERE createdDate >= dateadd(dd, datediff(dd, 0, GetDate()), 0)
GetDate
returns the current datetimedatediff(dd, 0, GetDate()), 0)
returns the days from the first date until nowdateadd(dd
ads ... these days to the first date, so we get the current date without time