|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sql statment
I want to retrieve data from the table between two dates.
So this statement is correct or not sql="select * from message where date BETWEEN '" & date & "' AND '" & date1 & "'" |
|
#2
|
||||
|
||||
|
SQL Server: WHERE (datefield BETWEEN CONVERT(DATETIME, '2004-01-01 00:00:00', 102) AND CONVERT(DATETIME, '2004-12-31 00:00:00', 102)) Oracle: where datefield between (to_date('01/01/2004','mm/dd/yyyy') ) and (to_date('12/31/2004','mm/dd/yyyy') ) MS Access: WHERE (((tablename.datefield) Between #1/1/2004# And #12/31/2004#)); I get a kick out of the platform independent room ![]() |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Sql statment |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|