Solved

convert text from a field in access in a query

Posted on 2014-03-05
1
512 Views
Last Modified: 2014-03-05
I have a table in access with a field "FileDate".
The data in that field is like (two sample lines)

"201078573470 2/24/2010 11:02:00 AM"
"201083243410 10/7/2010 10:30:00 AM"

I need to separate out the month / day / year in a query.
The result would be "2/24/2010" and "10/7/2010"
Is this possible?
0
Comment
Question by:drelinger
[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
1 Comment
 
LVL 30

Accepted Solution

by:
hnasr earned 500 total points
ID: 39907466
Try using:
Mid(FileDate, 13, 8)

If the first part is not fixed length then you need to check for the position of first / in the string.
In general:
Mid(FileDate, instr(1,FileDate,"/")-2,instr(instr(1,FileDate,"/"),FileDate, " ")-instr(1,FileDate,"/")+2)
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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.

687 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