Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi!


I have a table with fields dtFromDate (DateTime) and dtTodate (DateTime).

I am passing two dates to Sql StoreProcedure. (From Date) and (To Date).
If this period exist in the table then i want result as true else false.


Minal Shah.
Posted

1 solution

Your query would be something like
select * from myTable where myDate >= fromDate and myDate <= toDate.
Here fromDate and toDate are the dtFromDate and dtToDate values.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900