date syntax

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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.
 
Back
Top