general dates

  • Thread starter Thread starter Susie
  • Start date Start date
S

Susie

I am trying to filter dates in a query using a parameter
query (Between [Begin Date] and [End Date]), but the field
(which I can't change) is in general date format (which
includes the time). The filter is not recognizing any
dates with a time. Is there a way to trim or truncate
that field to just include the date (if I have no control
over the tables), or a way to specify that in a query. I
have tried to change the format of the field in the query,
but that still doesn't work. Any help would be
appreciated. Thank you in advance.
 
I am trying to filter dates in a query using a parameter
query (Between [Begin Date] and [End Date]), but the field
(which I can't change) is in general date format (which
includes the time). The filter is not recognizing any
dates with a time. Is there a way to trim or truncate
that field to just include the date (if I have no control
over the tables), or a way to specify that in a query. I
have tried to change the format of the field in the query,
but that still doesn't work. Any help would be
appreciated. Thank you in advance.


Even if your Date field contains the date AND time value,
Between [Begin Date] And [End Date]
should return records from midnite of the [Begin Date] UP TO midnite
of the [End Date].

I suspect your problem is that you are not getting records after
midnite of the [End Date].

Either enter an [End Date] of one day later than wanted (i.e. you wish
a date range of 10/1/2004 to 10/2/2004, enter 10/1/2004 and
10/3/2004),
or change the parameter to:
Between [Start Date] and Format([End Date],"m/d/yyyy 23:59:59")

Now all you need do is enter just 10/2/2004 and all records through
that date will be included.
 
Thank you so much Fred...it works like a charm!
-----Original Message-----
I am trying to filter dates in a query using a parameter
query (Between [Begin Date] and [End Date]), but the field
(which I can't change) is in general date format (which
includes the time). The filter is not recognizing any
dates with a time. Is there a way to trim or truncate
that field to just include the date (if I have no control
over the tables), or a way to specify that in a query. I
have tried to change the format of the field in the query,
but that still doesn't work. Any help would be
appreciated. Thank you in advance.


Even if your Date field contains the date AND time value,
Between [Begin Date] And [End Date]
should return records from midnite of the [Begin Date] UP TO midnite
of the [End Date].

I suspect your problem is that you are not getting records after
midnite of the [End Date].

Either enter an [End Date] of one day later than wanted (i.e. you wish
a date range of 10/1/2004 to 10/2/2004, enter 10/1/2004 and
10/3/2004),
or change the parameter to:
Between [Start Date] and Format([End Date],"m/d/yyyy 23:59:59")

Now all you need do is enter just 10/2/2004 and all records through
that date will be included.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Back
Top