question

dheeraj1981 avatar image
dheeraj1981 asked

how to include date logic to exclude data by date

i need to implement below logic

Exclude the patients where patient date is on or 1 day prior to event date :

select [patient date], [event date] from stu_tbl

where [patient date] <> DATEADD(d, - 1, [event date])

and [patient date] <> [event date]

patients date will be multiple

will the above condition work?

sql serverdate-functions
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

dheeraj1981 avatar image dheeraj1981 commented ·

select patient,[patient date], [event date] from stu_tbl

where [patient date] <> DATEADD(d, - 1, [event date])

and [patient date] <> [event date]

patients date will be multiple

will the above condition work?

0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.