convert number to date format

G

Guest

I have an Excel file with a Time column formatted as a general number (e.g.
830, 1102, 805). I need to convert these numbers to a time format like 8:30,
11:02, and 8:05.

I've tried =TEXT(a2,"h:mm"); however, it only returns a zero. These data
will be imported into a time formatted field in Access and later used to
determine the difference between schedule delivery time versus actual
delivery time.

Any assistance on how to convert this field would be very helpful. Thanks!
 
N

Nick Hodge

Lesley

Use

=TIMEVALUE(IF(LEN(A3)=3,LEFT(A3,1)&":"&RIGHT(A3,2),LEFT(A3,2)&":"&RIGHT(A3,2)))

And format as time

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
(e-mail address removed)
 
G

Guest

A1=1436

in B1:

=TIME(LEFT(A1,LEN(A1)-2),RIGHT(A1,2),0)

B1 ==> 14:36

Format cell as hh:mm

HTH
 
G

Guest

hi Lesley

try it:

=if(len(a2)<4,time(left(a2,1),right(a2,2),0),time(left(a2,2),right(a2,2),0))

hth
regards from Brazil
Marcelo

"Lesley" escreveu:
 
D

Dave Peterson

830 turns to 8 hours 30 minutes?
=--TEXT(A1,"00\:00\:\0\0")
Format as time.

Just in case....
830 turns to 8 minutes 30 seconds?
=--TEXT(A1,"00\:00\:00")
still format as time
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top