Access data datatype

Cladback

New member
Local time
Today, 02:01
Joined
Feb 11, 2016
Messages
1
Right so i spent 3 days at work to get my data in the correct format to upload into the database

fortunatly it pushed in with out errors

but the Date had to be forced in as text, then changed to date time in design view


now when i query the database on a date condition it wont work

i.e where date = 04/01/2015 but i get nothing even though i can locate the exact line myself in spreadsheet view its not my syntax its something to do with how its handeling the date how can i fix this


even where date between "01/01/2015" and "31/01/2015"

still nothing
 
As far as I know you'll have to use # around your date
date = 04/01/2015
Should be
date = "#" & Format(04/01/2015, "mm\/dd\/yyyy") & "# "

Or even

date = Format(04/01/2015, "#mm\/dd\/yyyy#")
 
..
now when i query the database on a date condition it wont work
...
Show the SQL-string of the query.
 
Date needs to be formatted #mm/dd/yyyy#

where date = #1/4/2015#
where date between #1/1/2015# and #1/31/2015#
 

Users who are viewing this thread

Back
Top Bottom