Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
LIKE did not work with DATE
Maarten Brusselers 
   
4 years ago
In Beginner 5/03 Richard showed the string LIKE"*/2012" to return the value of all customers in 2012.  No matter how I tried when I ran the query it always came up blank. When I ran LIKE "*" it returned all customers.  There are 2 records in the database with a date of 2012
All other examples worked but not that one.  I use Access 365.
Any ideas?
Kevin Robertson  @Reply  
          
4 years ago
What date format are you using?

mm/dd/yyyy will return results.
yyyy-mm-dd will not.
Maarten Brusselers OP  @Reply  
   
4 years ago
I first used short date as per Richard's example.  When that did not work I tried dd/mm/yyyy which did not work either.
Allan McConnell  @Reply  
     
4 years ago
Have you tried it without the /?

LIKE"*2012"

I have just tested it on my copy and do not appear to have any issues. My database is set to dd/mm/yyyy.
Richard Rost  @Reply  
           
4 years ago
This is most likely a regional date setting issue. I saw your screen shots that you emailed me. Post them here if you'd like to show everyone else. This is one of the reasons I strongly recommend everyone use the ISO Date Format.

Instead of that LIKE method I show in the video, I'd recommend creating a new Calculated Field of Year(MyDate) and setting its criteria to whatever year you're looking for, like Year(Date). Much better than the older method I showed in the video.
Maarten Brusselers OP  @Reply  
   
4 years ago
It worked by setting the date format in windows settings to the ISO format but I had to change the string from "*/2012" to "/2012*".
In the result it still showed up as per my date setting in the table, dd/mm/yyyy.
Richard Rost  @Reply  
           
4 years ago
I've got a video planned for this coming up soon... After the power is back on.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 9:24:23 PM. PLT: 1s