Afternoon Everyone!!
How can I do the following in 1 simple step?
Current DATE field appears like this:
20070720
I want the DATE field to appear like this:
07/20/2007
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » DATE (A2K)
This is a DOB field and when the data comes via ftp from the government, it comes in as a text field and appears 20072007. Since it is the DOB for the member it does appear on the form. This helps the user verify they have selected the correct member. Because of it’s appearance, others have problems reading it. So I want to have it appear as a DATE and in the correct order.
It won’t need it for any comparisons/calculations as we use the members ID or MedcaidID not the DOB.
If you keep it as a text field and change 20070720 to 07/20/2007, it will liik like a date, but it will not be a date.
The advantage of the 20070720 format is that you can sort the dates easily. If you try to sort values such as 07/20/2007 in a text field, the result will be nonsense.
But if you still want to go ahead, you can create a query based on the table.
Add the DOB field to the query grid.
Set the Criteria for this field to Is Not Null
Select Query | Update Query to change the query to an update query.
Enter the following expression in the Update to line, replacing DOB with the actual name of the field:
Mid([DOB],5,2) & "/" & Right([DOB],2) & "/" & Left([DOB],4)
Select Query | Run or click the Run button on the toolbar.
Warnings:
1) Make sure that the “DOB” field in the table has length at least 10.
2) Test the query on a copy of the table first.
3) You can run the query only once – if you run it again when the values have already been changed, you’ll get meaningless results.
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.