3
Answers

Date in Sql server 2008

aminu kaura

aminu kaura

11y
872
1

I have records in sql database table whith contain Date, ID, Name, Amount as colums. So my question is:

Which quary can i  use to select son record bettwin Date1 and Date2? 

 

Answers (3)
0
Abhay Shanker

Abhay Shanker

NA 10.5k 2.4m 11y
Hi,
Try this..

Select * from Order where date between '1/1/2013' and '9/1/2013'

Note:-Date must be in proper format ('mm/dd/yyyy' or 'yyyy/mm/dd')



0
Pradip Pandey

Pradip Pandey

NA 6.9k 1.1m 11y
Select * from tablename where [Date] between Date1 and Date2

e.g. Date1 = '06/04/2012'
Date2 = '06/10/2012'


Hope it will help you.
0
Sanjay Kumar

Sanjay Kumar

NA 5.8k 2.8m 11y
Hi

SELECT * FROM  tablename WHERE column_name BETWEEN '11/17/2013' AND '19/12/2012`