Solved

Microsoft, Access, 2003, convert 19970519 text to date format

Posted on 2007-11-19
3
2,559 Views
Last Modified: 2008-02-01
I am trying to covert the following text field 19970519 to a date field in Access 2003. This text field is in YYYYMMDD.
0
Comment
Question by:VFtechnology
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 20315240
something like this perhaps

mydatefield = dateserial(left$(mytextfield,4), mid$(mytextfield,5,2), right$(mytxtfield,2))

0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 20315271
cdate(mid("19970519",5,2)&"/"& mid("19970519",7,2)&"/"&left("19970519",4))

or

cdate(mid([datefield],5,2)&"/"& mid([datefield],7,2)&"/"&left([datefield],4))
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 20321518
VFtechnology
just out of interest, did dateserial not work for you? be interested to know where its failings with regards to your code
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question