Solved

Excel to Access time conversion issue

Posted on 2007-04-09
4
299 Views
Last Modified: 2008-02-01
Here was my original question:

Excel time format conversion issue
 
Question:
I had an import problem.  I imported a time from one spreadsheet to another and got the format mixed up.  Unfortunetly, I don't have the old data and don't want to change 25K rows by hand.

Here is what the time looks like in my spreadsheet

0:47:00

This is 47 minutes

It should be this

0:00:47

Can I convert this?

Ok, the accepted answer worked by changing all of the cells to d:mm:ss.  Now I need to get it into Access in the same format.  How do I do that?
0
Comment
Question by:farmingtonis
4 Comments
 
LVL 15

Expert Comment

by:dirknibleck
ID: 18878432
if they are all minutes, write a formula that captures just the minutes:

=TIME(0,0,MINUTE(A1))
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 18878434
Please see this link, then let me know if you have any questions:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_22498310.html?cid=236#a18871665

mx
0
 
LVL 15

Expert Comment

by:stanscott2
ID: 18878448
When you have an entry of 47 minutes, you just divide by 60 to get 47 seconds.

You can modify the Excel spreadsheet first.  If I had a column of these entries starting in cell A2, I'd first insert a blank column next to it, enter the formula:  =A2/60 and then copy it down, convert it to values with a range value and then copy it back to the original column.

Does this help?
0
 
LVL 9

Expert Comment

by:BTognietti
ID: 18878499
You can apply similar formatting to the Access field. A question first on the Excel format, d:mm:ss would display 0:47:00, if you were looking for 0:00:47, you would want d:hh:mm.

For the Access field, right-click the table > Design view > Select the field you wish to format > Select Date/Time from the Data Type drop down > Select Short Time from the Format Menu.

Good luck,

Bud
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
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…

705 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

19 Experts available now in Live!

Get 1:1 Help Now