Hi ,
I my report data supposed to display in date filters.
While writing query i face problem like it could not fetch data as per my assumption as SQL was also comparing the time value. But for me it should only filter based on the Date part ignoring the time part.
So Below is the query to filter date ignoring time from date.
select * from tbl
where CAST(FLOOR(CAST(Created AS float))AS datetime) = CAST(FLOOR(CAST(getdate() AS float))AS datetime)
Thank you .
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment