Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
dear sir,
i want to check is selected_date is beetwen relase_date and remove_date...

plz help...
Posted

1 solution

Depends on how you want to do it - and we can;t see your screen, so we can't tell!
In C# code:
C#
DateTime now = DateTime.Now;
if (release_date <= now && now <= remove_date)
   {
   ...
But in SQL:
SQL
SELECT * FROM MyTable WHERE GETDATE() BETWEEN release_date AND remove_date
 
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