?
Solved

convert text from a field in access in a query

Posted on 2014-03-05
1
Medium Priority
?
526 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 31

Accepted Solution

by:
hnasr earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

807 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