ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   extract time from excel serial date (https://www.excelbanter.com/excel-programming/300662-extract-time-excel-serial-date.html)

Dan W[_2_]

extract time from excel serial date
 
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



Bob Phillips[_6_]

extract time from excel serial date
 
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)

"Dan W" <Dw6853_AT_msn_DOT_com wrote in message
...
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





Dan W[_2_]

extract time from excel serial date
 
Thanks Bob
That did the trick


"Bob Phillips" wrote in message
...
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)

"Dan W" <Dw6853_AT_msn_DOT_com wrote in message
...
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







Ron Rosenfeld

extract time from excel serial date
 
On Mon, 7 Jun 2004 12:39:17 -0600, "Dan W" <Dw6853_AT_msn_DOT_com wrote:

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

Dan W[_2_]

extract time from excel serial date
 
Thanks Ron

--

Dan W
(replace _DOT_ and _AT_ with normal email characters "@ . " if mailing
direct)


"Ron Rosenfeld" wrote in message
...
On Mon, 7 Jun 2004 12:39:17 -0600, "Dan W" <Dw6853_AT_msn_DOT_com wrote:

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





All times are GMT +1. The time now is 04:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com