Ignore Time In Date and Time Field (1 Viewer)

ir26121973

New member
Local time
Today, 20:34
Joined
Mar 6, 2006
Messages
5
Hi,

Wonder if someone can help please. I'm quite new to Access so please bear with me.

I have a data field in my database consisting of both a date and time.

I then have a form containing two fields where the user can type a 'To' and 'From' date to extract the records that they are interested in. The query behind this uses the 'Between[Enter The Date] And [Enter The Date]' coding.

The problem is that because the field contains a time it doesn't return any records when I run the query.

Can anyone offer a bit of guidance on how I could ignore the time part of the field perhaps by adapting the above.

Many thanks

Chris
 

boblarson

Smeghead
Local time
Today, 13:34
Joined
Jan 12, 2001
Messages
32,059
Create an extra column in your query that is formatted to just date:

DateOnly:Format(YourDateFieldNameHere,"mm/dd/yyyy")

and put the between criteria in the criteria of that column
 

ir26121973

New member
Local time
Today, 20:34
Joined
Mar 6, 2006
Messages
5
That's great Bob, many thanks much appreciated.

Regards

Chris
 

Users who are viewing this thread

Top Bottom