Click here to Skip to main content
15,888,271 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

when i give from date and to date, my output must have both between dates and equal date records. Can anybody help me?

Thanks in advance
Posted

Read the documentation first : http://www.techonthenet.com/sql/between.php[^]
 
Share this answer
 
select * from your table where yourdatecolumn>=@from date and yourdatecolumn<=@todate
 
Share this answer
 
try..
SQL
select * from table_name where Date_column between date_1 and Date_2
select * from table_name where Date_column>=date_1 and Date_column<=Date_2

Link Here.
http://msdn.microsoft.com/en-IN/library/ms187922.aspx[^]
 
Share this answer
 

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

  Print Answers RSS


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