Converting text to date in Access query

Universal

New Member
Joined
Feb 10, 2004
Messages
8
I am querying off of a linked table that contains a date that is in TEXT format with the following structure: "yyyymmdd." The structure of the output is agreeable with the rest of my data, but the format is not. Is there a way to get the query reults in DATE FORMAT?

With my current data, when I export to excel and try to give it a date format I get errors when I try to upload the data back into an access database.

Is there code that will work in the query? I can't change the format of the linked table I am pulling from. Somebody please help!

Thanks,
Nick
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hullo. One way around this would be to have a field in your query something like this:
Code:
FormattedDate:MID(field,5,2)&"/"&RIGHT(field,2)&"/"&LEFT(field,4)
That would turn 20040708 into 07/08/2004 for M/D/Y format.

HTH (y)

P
 
Upvote 0

Forum statistics

Threads
1,221,776
Messages
6,161,870
Members
451,727
Latest member
tyedye4

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