Change format on data that is imported from Access

jcaptchaos2

Well-known Member
Joined
Sep 24, 2002
Messages
1,032
Office Version
  1. 365
Platform
  1. Windows
I have some data that is brought in from an Access database query, in the access query the data is formatted as short time. When it is pulled into my excel spread sheet it is formatted as text. '8:12 I need to add that data and the only way I am able to do that is highlight the column of data in the table and use the text to column feature to remove the '. The only issue is when the table is refreshed I will have to do it over and over again. Is there another way to do it?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
How is the data getting pulled into Excel?

Is the field actually a date/time field?
 
Upvote 0
Norie,

It is being pulled using the get external data option in excel, in the access query it is formatted as short time.
 
Upvote 0
How is it being formatted in the query?

Is the Format function being used?

If it is then you probably are importing text, that's what the Format function returns.
 
Upvote 0
In query it is being formatted as "Short Time" I am not sure how to check if it is using the Format function.
 
Upvote 0
Excel isn't recognizing this as a time.
I would try a different format (cross fingers). Instead of Short Time enter the format:

hh:nn AM/PM

I think Excel will correctly interpret it this way.
 
Upvote 0
Xenou,

Thanks for responding, it still comes out as '6:12 test.
 
Upvote 0
Are you sure that you have a time data type in the database, and not a text data type?
 
Upvote 0
What's the expression for the calculation?
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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