473,396 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Formatting a date to be used in a date range

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
2 1563
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: androtech | last post by:
Hello, I'm looking for a function that returns a date range for a specified week number of the year. I'm not able to find functions like this anywhere. Any pointers/help would be much...
3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
0
by: ImraneA | last post by:
Hi there Many thanks to those people who contributed to this group, helped me greatly. Enclose, my code, hope it helps others :- Public Function Export_Excel_9(tbx1 As Variant, tbx2 As...
18
by: dfetrow410 | last post by:
Anyone have some code that will do this? Dave
7
by: Middletree | last post by:
I am trying to display dates in a spreadsheet, but the dates need to be in a format that will allow them to be sorted in Excel. The datatype in the SQL Server database is datetime. In this case, I...
2
by: OdAwG | last post by:
Hello Again Access GURU's, Need some help with Conditional Formatting and datediff. What I am trying to do is the following: I have three text boxes with dates in them and what I want to do...
1
by: Shawn29316 | last post by:
Hi, I've used a form to capture the requesters date range specifications for a set of queries forever and never cared that it took the short date entered by the requester and changed it to a...
10
by: afromanam | last post by:
Regards, Please help What I'm trying to do is this: (and I can't use reports since I must export to Excel) I export some queries to different tabs in an excel workbook I then loop through...
3
by: Tim | last post by:
Folks, I'm trying to format a print string so that it reports progress whilst processing a looping structure with a date time stamp appended to the end of the string. This started out life as a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.