date syntax

G

Guest

hi,
what wrong in that syntax ?:
i get = 0 even when i have the identical date

checkSysCurencySQL = "select count(*) from Rates where
format(Rate_Date,'dd/mm/yyyy') = " & Format(date, "\#dd\/mm\/yyyy\#") & ""

thanks
 
G

Guest

It looks like it should work, but that doesn't necessarily mean anything.

Have you tried:

checkSysCurencySQL = "select count(*) from Rates where
format(Rate_Date,'dd/mm/yyyy') = #" & Format(date, "dd/mm/yyyy") & "#"

It may not make a difference but I'd give it a try.

Bryan
 
R

RoyVidar

SIN said:
hi,
what wrong in that syntax ?:
i get = 0 even when i have the identical date

checkSysCurencySQL = "select count(*) from Rates where
format(Rate_Date,'dd/mm/yyyy') = " & Format(date, "\#dd\/mm\/yyyy\#")
& ""

thanks

I'm not sure what you're comparing here, but do try the following

checkSysCurencySQL = "select count(*) from Rates " & _
"where Rate_Date = " & Format(date, "\#mm\/dd\/yyyy\#")

See http://allenbrowne.com/ser-36.html for more info.
 

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