By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,647 Members | 1,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,647 IT Pros & Developers. It's quick & easy.

Formatting a date to be used in a date range

P: n/a
Hello everyone,

Okay so here is my pickle! I have a field called ARCH_DATE within a
table which has a date stored like "9/1/2004 23:50:00". What I would
like to do is create a date range which prompts a user to ONLY to
enter a format like "mm/dd/yy". I am not interested in the time
component, I really am interested in the date. I have exhuasted my
resources on this one, any help would be greatyl appreciated.

Tony
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Tony" <an**************@gmail.com> wrote in message
news:4c**************************@posting.google.c om...
Hello everyone,

Okay so here is my pickle! I have a field called ARCH_DATE within a
table which has a date stored like "9/1/2004 23:50:00". What I would
like to do is create a date range which prompts a user to ONLY to
enter a format like "mm/dd/yy". I am not interested in the time
component, I really am interested in the date. I have exhuasted my
resources on this one, any help would be greatyl appreciated.


Dates in Access are not *stored* with any format. That is strictly a display
property.

If you want all values falling between two dates (inclusive) provide a form for
the user to enter the two dates and have your criteria like...

BETWEEN Forms!FormName!StartDate AND DateAdd("d", 1, Forms!FormName!EndDate)

It would be a good idea to explicitly set these parameters in the query
parameter dialog as Date DataTypes as well. Access usually assumes the type
correctly, but not always.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

P: n/a
Sorry perhaps I should clarify what I am doing so that way you will
know what I am after. I using a query that uses a BETWEEN and AND
parameter that asks the user to enter a start date and an end date.
The problem is that the parameter is on a field called ARCH_DATE that
has the date format as "09/01/04 23:59:00". I want to be able to
create a parameter query on ARCH_DATE but only asking the user to
enter a date format like "MM/DD/YY". I have tried creating a new field
where I format ARCH_DATE to "MM/DD/YY", and I have go this to work.
When I try to do a search for "01/01/04 to 04/30/04" it pulls data for
the correct data for the days and the months, the problem occurs when
it pulls the years for 01,02,03, and 04. Am I missing something in
formating the date?

Dates in Access are not *stored* with any format. That is strictly a display
property.

If you want all values falling between two dates (inclusive) provide a form for
the user to enter the two dates and have your criteria like...

BETWEEN Forms!FormName!StartDate AND DateAdd("d", 1, Forms!FormName!EndDate)

It would be a good idea to explicitly set these parameters in the query
parameter dialog as Date DataTypes as well. Access usually assumes the type
correctly, but not always.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.