[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2007-11-19
3
Medium Priority
?
2,562 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 2000 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

656 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