Solved

convert text from a field in access in a query

Posted on 2014-03-05
1
488 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
1 Comment
 
LVL 30

Accepted Solution

by:
hnasr earned 500 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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.
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now