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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |