|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Fliter Query by date
Hi all helpful programmers, pls help me. I am a beginner in programming. I am using Dreamweaver MX and MS SQL Server.
I have a field named Date, data type is datetime and the default value is getdate(). So what is the sql statement to filter all my record according to a range of date i want? I also need advise on using Dreamweaver MX to filter the record as well. Thanks |
|
#2
|
|||
|
|||
|
Here's a skeleton you can use...
Code:
select * from [yourTable] where [yourDateField] between '[date]' and '[date]' |
|
#3
|
|||
|
|||
|
Do I need to use single quote '6/31/04' on the date?
Do I need take the data type specify in the database into consideration for searching? |
|
#4
|
|||
|
|||
|
Ya you'll need single quotes (I edited my orig reply).
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Fliter Query by date |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|