Covert text date to date format

TinaK

New Member
Joined
Dec 13, 2019
Messages
6
Office Version
  1. 2013
Platform
  1. Windows
I have a table that is imported from a text file. The date from the text file is stored as "short text" in my access table. (2018012903:3913010100110201). I want to convert it to 01/29/2018. I have tried several different ways and nothing has worked. This is the closest I was able to get:
Expr1: Right([field3],2) & "/" & Mid([field3],7,2) & "/" & Left([field3],4)
Results
test1

Field3Expr1
2018012903:391301010011020101/29/2018
2018012807:211277011011040202/28/2018
2018012807:351278012011040202/28/2018
As you can see, the first one is correct, the others are not.

After I convert it to a date, I want to use "between #xx/xx/xx# and #xx/xx/xx#.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,214,858
Messages
6,121,956
Members
449,057
Latest member
FreeCricketId

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top