Hi Fred,
What i'm attempting to do is run a query that will tell me how many
orders of the same item were issued on the same day. The dates
consist of the Date and Time format so when i run it it doesn't
group them properly with the time. So if I can remove the time
portion it will work correctly. If I use the =Int([MyDate])
function it turns the date into a numeric value (i.e. 37714). I
hope i'm explaining this clearly. Thanks for your help.
That's because the date is actually stored as a double decimal number,
with the integer portion (i.e. 37714) as the date (4/3/2003), and the
decimal portion (i.e. .5) representing the percentage of the 24 hour
day, so .5 represents Noon, .25 represents 6:00 AM., .75 represents
6:00 PM.
Today is 38181.
You could simply use
Where Format([DateField],"m/d/yyyy") Between [Start Date] and [End
Date]
The date would then be entered using m/d/yyyy format.
Or ..
Where [DateField] Between [Enter Start] and [Enter End] + 1
leaving the time field in the date as it is, but just having the query
add 1 day automatically to whatever the end date is, to include
records of that last day, regardless of their time value.
If you do it this way, you must declare the [Enter Start] and [Enter
End] parameters as Date/Time in the Query Parameter dialog box..
In design view, click Query + Parameters.
If you wish to remove permanently all the time values in the date
field, you could run an update query:
Update YourTable Set YourTable.[DateField] = int([DateField])
Where [DateField] Is Not Null;
You'll remove all the time values, but it will still be a Date/Time
field.
I hope this clarifies and helps.