View Single Post
  #1 (permalink)  
Old 11-05-03, 08:03
PC2 PC2 is offline
Registered User
 
Join Date: Nov 2003
Posts: 4
need to use floor() function in access

I have a datatable in access that has a field that contains date information (called Trade_Date). This date is not truncated so I have hour, minutes and seconds information. I need to make a query from VBA to retrieve data for a specific date so I need a query like

" SELECT Trade_Date,... FROM Table WHERE floor(Trade_Date) = desired Date "

I am using Microsoft.Jet.OLEDB.4.0 as the provider and floor() function is not recognized.
In the help I found that scalar functions like floor() should work since you use {} like:

" SELECT Trade_Date,... FROM Table WHERE {fn floor(Trade_Date)} = desired Date "

but it is still not working.
I also tried to use a pass-through query but It fails (maybe because I am not used with this)

Can someone please help me. I need to use a floor() function but don't know how.
Thanks,
PC2
Reply With Quote