extract time from excel serial date

D

Dan W

Hi all

Is there a way(VBA or function/formula) to extract the time from a serial
date in excel?

i.e. date in cell is 38140.7291666667 (6/2/2004 5:30 pm)
and want to extract time only

Thanks in advance

DW
 
B

Bob Phillips

Function

=A1-INT(A1)

VBA

Now - Date

or

Range("A1") - Int(Range("A1"))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
D

Dan W

Thanks Bob
That did the trick


Bob Phillips said:
Function

=A1-INT(A1)

VBA

Now - Date

or

Range("A1") - Int(Range("A1"))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
R

Ron Rosenfeld

Hi all

Is there a way(VBA or function/formula) to extract the time from a serial
date in excel?

i.e. date in cell is 38140.7291666667 (6/2/2004 5:30 pm)
and want to extract time only

Thanks in advance

DW

With the value in A1, =MOD(A1,1) will extract the fractional part, which is
the time.


--ron
 

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

Top