problem with query in ASP using date()

S

sravanthi

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

%>
 
J

John Spencer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top