Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
LastUpdate from a text field
Stephen Fugowski 
    
2 years ago
I need to update a date field with the last date in a text field that contains numerous dates. Is there a way to do this instead of manually going through each record to update the LastUpdate field?  For example:

The text field contains the following:
updated 10/31/11, 9/27/12; 11/21/13; 10/28/14; 10/26/15, 1/19/17, 1/23/18; 1/18/19, 1/21/20; 8/4/20; 8/17/21, 8/16/23 10/5/23;

How can I extract 10/5/23 from the above text field? The dates are not always  in the same format.
Alex Hedley  @Reply  
           
2 years ago
Have you tried the Split Function?
Stephen Fugowski OP  @Reply  
    
2 years ago
Thanks for your quick response. There is no specific delimiter as in the example. Sometimes it is a comma, and sometimes it is a semi-colon, and sometime it is a space. So it would be difficult to create an array of dates. Also, the last date is not always in the same format. It may be m/d/yy, or m/d/yyyy ormm/dd/yy, or mm/dd/yyyy. And the text field contains other text such as "updated" or "new". I feel it may not be possible.
Alex Hedley  @Reply  
           
2 years ago
Where is the list of dates coming from?
Can that be standardised?

You could split by all the delimiters.
Then you could get the last item.
Then you could split by /
And use DatePart
Sami Shamma  @Reply  
             
2 years ago
Hi Stephen,  
Is this your database? Why are you not storing the dates in a child table?
Kevin Robertson  @Reply  
           
2 years ago
You could use the Replace Function to make all delimiters the same.
Then use some String Functions to remove the last semi-colon.
Then Split the split the string based on the delimiter.

The screenshot below shows this process for a single field based on the information given.
If you need to do this for multiple records you will need a Recordset loop.
Kevin Robertson  @Reply  
           
2 years ago

Kevin Yip  @Reply  
     
2 years ago
>> There is no specific delimiter as in the example. Sometimes it is a comma, and sometimes it is a semi-colon, and sometime it is a space. <<

If it is totally free-form text, you need to consider other possibilities: what if a comma (or any delimiter) is followed by one space, no space, or multiple spaces?  What if the user typed space-ccomma-space, space-space-comma, comma-space-space, etc.?  What if the user typed invalid dates due to typos: 10//18/24, 10/1 8/24, etc.  The more irregularities like these, the more difficult it would be (if not impossible) to write code to extract data from the text.  You need to have a better way to control user input instead of allowing free-form text entry with no validation nor control.
John Davy  @Reply  
         
2 years ago
Sami asked a very important question that Stephen should address.

John
Matt Hall  @Reply  
           
2 years ago
You might also check out InStrRev and be prepared to do some manual data scrubbing.  

Long term, you might check out Normalizing Data.  As you are probably aware, this is the cost of not Normalizing data in the beginning.

You are not alone in dealing with non-Normalized data.  It requires an evaluation of the data and an application of the recommended topics to clean as much data as you can.  It will likely require some manual scrubbing of the rest.
Stephen Fugowski OP  @Reply  
    
2 years ago
Sorry for not getting back to everyone sooner. Other issues came up. To answer Sami's question, No it is not my Database. It belongs to a Food Pantry/Thrift Store where I volunteer.  Their programmer retired and I told them I did some Access programming throughout my career. And now that I am their programmer (also volunteer work) I am tasked with converting their flat file Database into a truly relational Database.
Stephen Fugowski OP  @Reply  
    
2 years ago
Thank you all for your help.
Stephen Fugowski OP  @Reply  
    
2 years ago
After considering my options and realizing that this field of data is too abnormal (it starts out being 1 date, sometimes represented  as "New " + the date the client becomes a member), I have decided that it will be a manual process and changed to just one date: LastUpdate on the client's record and it only gets updated once a year due to federal regulations.There is no need to keep all the previous updates. Once again, Thank you everyone for your input.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access 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: 8/8/2026 11:35:18 AM. PLT: 0s