473,788 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1585
"Tony" <an************ **@gmail.com> wrote in message
news:4c******** *************** ***@posting.goo gle.com...
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
5219
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 appreciated. TIA
3
5935
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 terminated by pressing ++ and then terminate the process. I searched the entire internet and found out that there could be two things wrong (both of them are mentioned in the bug list on the access
0
3109
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 Variant, tbx3 As Variant, tbx4 As Variant, tbx5 As Variant, tbx6 As Variant, tbx7 As
18
38248
by: dfetrow410 | last post by:
Anyone have some code that will do this? Dave
7
3072
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 need to display the date only, not the time. But I don't want to change the datatype in the database because the time is used in other places. So what I am doing is pulling it out of the database, then modifying it in ASP/VBScript by using the...
2
3652
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 is change the background color if the date in the text box get within a certain date range. Date Range:
1
1413
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 number when it stored the date for later use. Now I'm trying to subtract that number from a date supplied from a system database, which is in short date format, and the output looks like a short date instead of a number. Can someone help me get a...
10
9696
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 each tab and apply autowidth to columns and apply autofilter to the first row of every tab in the workbook. I've this down
3
30840
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 simple need to create a display that show progress to users when updating large tables in a data warehouse in real time. I have subsequently address that need through a different method, however I am challenged by the seeming impossibility to...
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10366
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10173
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.