A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

date format conflict



 
 
Thread Tools Display Modes
  #1  
Old July 12th, 2004, 01:32 PM
steve mckenna
external usenet poster
 
Posts: n/a
Default date format conflict

I have a database that searches for documents by date of
document and date received. If the exact date is not know
I have set up a parameter query that allows the user to
search for dates between and. Both dates are set up s
medium date with a data type of Date/Time. On the
parameter query it accepts dates in any format i.e.
12/07/04 or 12 Jul 04. However on the single date query
it only accepts 12/07/04. I need both these queries to
acept dates input in any format. How do I achieve this,
many thanks in advance
Steve
  #2  
Old July 12th, 2004, 01:54 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default date format conflict

Declare the parameter in your query, so Access knows what type it is.

Open the query in design view.
Choose Parameters on the Query menu.
Enter the exact name of the parameter, and in the 2nd column of the dialog,
specify the Date/Time type.

Internally, Access stores the date/time as a fractional number, where the
whole number represents the date, and the decimal part is the time (fraction
of a day). The way you enter the date/time therefore is not the issue. It is
just a matter of ensuring that Access correctly understands what you enter.

For more clues on how to avoid the 3 cases where Access is likely to
misunderstand your date format, see:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"steve mckenna" wrote in message
...
I have a database that searches for documents by date of
document and date received. If the exact date is not know
I have set up a parameter query that allows the user to
search for dates between and. Both dates are set up s
medium date with a data type of Date/Time. On the
parameter query it accepts dates in any format i.e.
12/07/04 or 12 Jul 04. However on the single date query
it only accepts 12/07/04. I need both these queries to
acept dates input in any format. How do I achieve this,
many thanks in advance
Steve



  #3  
Old July 12th, 2004, 02:12 PM
steve mckenna
external usenet poster
 
Posts: n/a
Default date format conflict

It doesn't appear to work. The problem I am having is I
want to search for a specfic date in the format e.g. 12
Jun 04 or 12/06/04 where the query accepts both forms of
input. At the moment the criteria is set as Like [Enter
Date] but it only accepts the 12/06/04 format i.e. nothing
is returned if you type 12 Jun 04.

-----Original Message-----
Declare the parameter in your query, so Access knows what

type it is.

Open the query in design view.
Choose Parameters on the Query menu.
Enter the exact name of the parameter, and in the 2nd

column of the dialog,
specify the Date/Time type.

Internally, Access stores the date/time as a fractional

number, where the
whole number represents the date, and the decimal part is

the time (fraction
of a day). The way you enter the date/time therefore is

not the issue. It is
just a matter of ensuring that Access correctly

understands what you enter.

For more clues on how to avoid the 3 cases where Access

is likely to
misunderstand your date format, see:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"steve mckenna"

wrote in message
...
I have a database that searches for documents by date of
document and date received. If the exact date is not

know
I have set up a parameter query that allows the user to
search for dates between and. Both dates are set up s
medium date with a data type of Date/Time. On the
parameter query it accepts dates in any format i.e.
12/07/04 or 12 Jul 04. However on the single date query
it only accepts 12/07/04. I need both these queries to
acept dates input in any format. How do I achieve this,
many thanks in advance
Steve



.

  #4  
Old July 12th, 2004, 02:12 PM
steve mckenna
external usenet poster
 
Posts: n/a
Default date format conflict

It doesn't appear to work. The problem I am having is I
want to search for a specfic date in the format e.g. 12
Jun 04 or 12/06/04 where the query accepts both forms of
input. At the moment the criteria is set as Like [Enter
Date] but it only accepts the 12/06/04 format i.e. nothing
is returned if you type 12 Jun 04.

-----Original Message-----
Declare the parameter in your query, so Access knows what

type it is.

Open the query in design view.
Choose Parameters on the Query menu.
Enter the exact name of the parameter, and in the 2nd

column of the dialog,
specify the Date/Time type.

Internally, Access stores the date/time as a fractional

number, where the
whole number represents the date, and the decimal part is

the time (fraction
of a day). The way you enter the date/time therefore is

not the issue. It is
just a matter of ensuring that Access correctly

understands what you enter.

For more clues on how to avoid the 3 cases where Access

is likely to
misunderstand your date format, see:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"steve mckenna"

wrote in message
...
I have a database that searches for documents by date of
document and date received. If the exact date is not

know
I have set up a parameter query that allows the user to
search for dates between and. Both dates are set up s
medium date with a data type of Date/Time. On the
parameter query it accepts dates in any format i.e.
12/07/04 or 12 Jul 04. However on the single date query
it only accepts 12/07/04. I need both these queries to
acept dates input in any format. How do I achieve this,
many thanks in advance
Steve



.

  #5  
Old July 12th, 2004, 03:27 PM
Rick Brandt
external usenet poster
 
Posts: n/a
Default date format conflict

"steve mckenna" wrote in message
...
It doesn't appear to work. The problem I am having is I
want to search for a specfic date in the format e.g. 12
Jun 04 or 12/06/04 where the query accepts both forms of
input. At the moment the criteria is set as Like [Enter
Date] but it only accepts the 12/06/04 format i.e. nothing
is returned if you type 12 Jun 04.


Try CDate([Enter Date])


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


  #6  
Old July 13th, 2004, 12:42 PM
Steve McKenna
external usenet poster
 
Posts: n/a
Default date format conflict

Rick,

it worked a treat, many thanks
Steve
-----Original Message-----
"steve mckenna"

wrote in message
...
It doesn't appear to work. The problem I am having is I
want to search for a specfic date in the format e.g. 12
Jun 04 or 12/06/04 where the query accepts both forms of
input. At the moment the criteria is set as Like [Enter
Date] but it only accepts the 12/06/04 format i.e.

nothing
is returned if you type 12 Jun 04.


Try CDate([Enter Date])


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Dilema! Kagsy General Discussion 8 July 13th, 2004 03:45 AM
Date format for Track Changes Stuart K New Users 1 June 13th, 2004 11:09 AM
Track change Author/Date popup shows US date format not correct regional set Wayne Zaunders New Users 1 May 23rd, 2004 11:57 AM
Pivot Table - Format of Date Field Peo Sjoblom Worksheet Functions 0 February 3rd, 2004 07:20 PM
Changing date format to text only Worksheet Functions 0 January 1st, 2004 07:37 AM


All times are GMT +1. The time now is 05:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.