Access 2007-2016
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
 
Home   News   Tips   Glossary   Templates   Forums   Help   Logon   Order   Contact Us  
 
Tips & Tricks

New Tips Added Weekly!
Click here to get on our Mailing List

   
 

Convert Numbers to Dates

Use an Update Query, Left, Right, and Mid Functions

Q: I received a database from someone that has dates stored as six-digit numbers such as 990102 for Jan-02-1999. How do I convert them to Access Dates?

A: You've inherited a database that has dates in a text field, with a format like 990102. You need to convert those to regular Access date fields. Here's my sample table:

Add a new blank DATE field to your table to store your new value. My old date is in the text field CustomerDOB, so I'll add a new one called NewCustomerDOB.

Now I'll create an UPDATE QUERY using the LEFT, RIGHT, and MID functions to put the date together:

Be sure to back up your database before running any update queries as there is always the possibility of data loss!

Watch the video lesson below to see how it's done. I cover a LOT more detail in the full lesson. I've actually added what to do if you get a date that's not exactly six digits... if your dates are stored in NUMBER type fields, you can't have leading zeros.

 Click here to view the FREE video

 

Taken from Microsoft Access 309, Lesson 4:

4. Converting Numbers into Dates
Got a field with dates like 990105
Convert with an Update Query to 1/5/99
LEFT, RIGHT, MID functions
Update Query
String Concatenation
Calculated Fields

 

 


By Richard Rost   Richard Rost on Facebook Richard Rost on Twitter Richard Rost on Google Plus Richard Rost on LinkedIn Email Richard Rost

Click here to sign up for more FREE tips

 

You may want to read these articles from the 599CD News:

 

Learn
 
Accessindex
Excelindex
Wordindex
Windowsindex
PowerPointindex
Photoshopindex
Visual Basicindex
ASPindex
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Free Upgrades
Insider Circle
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Articles
Search Our Site
Waiting List
Production Schedule
Collapse Menus
Help
 
Live Chat
Customer Support
WalkThru Tutorials
Troubleshooting
FAQs
TechHelp
Consulting Services
About Us
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Gift CDs
Contact
 
Live Chat
General Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

Google Plus    LinkedIn

Blog RSS Feed    YouTube Channel
Richard Rost Microsoft MVP