If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
problem with query in ASP using date()
Hi.
Hi, I am novice to ASP,I am using vb script and MSacceess for database.When ever I use the following code it gives the error.I am sure the problem is with entry_datetime='#"data"#' but not sure how to resolve it.It would be great if some one helps me in resolving the following query. . % data=date() dim rs1,sql1 Set rs1 = Server.CreateObject("Adodb.RecordSet") sql1="select * from web where format(entry_datetime,'"mm/dd/yyyy hh:min:ss"') =format('#"data"#','"mm/dd/yyyy hh:min:ss"') and stace = 'oregon' " rs1.open sql1,conn,1,1 % |
#2
|
|||
|
|||
problem with query in ASP using date()
sql1="SELECT* from web WHERE Format(entry_datetime,""mm/dd/yyyy hh:nn:ss"")
=Format(data,""mm/dd/yyyy hh:nn:ss"") and stace = 'oregon' " I am concerned that Format is being used since I am not aware of whether or not you can use FORMAT directly with Jet. John Spencer Access MVP 2002-2005, 2007-2009 The Hilltop Institute University of Maryland Baltimore County sravanthi wrote: Hi. Hi, I am novice to ASP,I am using vb script and MSacceess for database.When ever I use the following code it gives the error.I am sure the problem is with entry_datetime='#"data"#' but not sure how to resolve it.It would be great if some one helps me in resolving the following query. . % data=date() dim rs1,sql1 Set rs1 = Server.CreateObject("Adodb.RecordSet") sql1="select * from web where format(entry_datetime,'"mm/dd/yyyy hh:min:ss"') =format('#"data"#','"mm/dd/yyyy hh:min:ss"') and stace = 'oregon' " rs1.open sql1,conn,1,1 % |
Thread Tools | |
Display Modes | |
|
|