Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / April 2007

Tip: Looking for answers? Try searching our database.

Query for a date, any date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RobertM - 09 Apr 2007 21:36 GMT
Hello:

This seems too simple, but I just can't see how to do it. I need to query
for a date, any date. As long as MM/YY or MM/DD/YY or MM/DD/YYYY appears with
any date in a feild I need it to come up in a query. The dates are mixed into
a name feild. For example I'm currently also querying for names that have
"144A" in them. So if a Name in the table is "Westinghouse 144A" is will
appear in the query. I expect values such as "Westinghouse 04/09/2009" to
come up. I want these to come up in the query. The exact date does not
matter. If it has any date it needs to report.

Thank you,
Robert
KARL DEWEY - 09 Apr 2007 23:12 GMT
>>As long as MM/YY or MM/DD/YY or MM/DD/YYYY appears with any date
It ain't so simple because Access will see these combinations as text and
not as dates.   IF your dates ALWAYS use two digit monthe and two digit day
as shown above you are in a little luck - maybe.
Use these as criteria --
   Like "* ??/??/???? *"  OR    Like "* ??/??/?? *"  OR  Like "* ??/?? *"

Signature

KARL DEWEY
Build a little - Test a little

> Hello:
>
[quoted text clipped - 9 lines]
> Thank you,
> Robert
John W. Vinson - 10 Apr 2007 03:33 GMT
>Hello:
>
[quoted text clipped - 9 lines]
>Thank you,
>Robert

The 144A is of course easy: LIKE "*144A*"

As Karl says, getting fields containing a date is a tough one. Might these be
"hits"?

"Westinghouse 10-13-2001"
"Westinghouse May 15, 2006"
"Westinghouse 5/3"

What's the context? Why do you have this non-atomic data? Is there any way to
get the information more cleanly?

I was trying to think of a way to substring the data and use the IsDate()
function to check, but I can't think of any efficient way to do it.

            John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.