A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

convert second to date and time



 
 
Thread Tools Display Modes
  #1  
Old December 7th, 2006, 09:53 AM posted to microsoft.public.excel.worksheet.functions
--== Alain ==--
external usenet poster
 
Posts: 5
Default convert second to date and time

Hi,

i've got some exported log from unix platform.
in those logs, time and date is written as lapsed second since 01.01.1970.

How can i extract date and time from this lapsed second since 01.01.1970.

e.g : 1165391099.763

thanks a lot,

Al.
  #2  
Old December 7th, 2006, 10:43 AM posted to microsoft.public.excel.worksheet.functions
Bob Phillips
external usenet poster
 
Posts: 1,032
Default convert second to date and time

This gets the number of years assuming that value is in A1

=DATEDIF(--"1970-01-01",--"1970-01-01"+A1/24/60/60,"Y")

How do you want the answer?

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"--== Alain ==--" wrote in message
...
Hi,

i've got some exported log from unix platform.
in those logs, time and date is written as lapsed second since 01.01.1970.

How can i extract date and time from this lapsed second since 01.01.1970.

e.g : 1165391099.763

thanks a lot,

Al.



  #3  
Old December 7th, 2006, 12:48 PM posted to microsoft.public.excel.worksheet.functions
David Biddulph
external usenet poster
 
Posts: 609
Default convert second to date and time

=DATE(1970,1,1)+A1/24/60/60 and format as dd.mm.yyyy hh:mm:ss.000 (to show
as 06.12.2006 07:44:59.763) or however you want it displayed.
--
David Biddulph

"--== Alain ==--" wrote in message
...
Hi,

i've got some exported log from unix platform.
in those logs, time and date is written as lapsed second since 01.01.1970.

How can i extract date and time from this lapsed second since 01.01.1970.

e.g : 1165391099.763

thanks a lot,

Al.



  #4  
Old December 8th, 2006, 07:57 AM posted to microsoft.public.excel.worksheet.functions
--== Alain ==--
external usenet poster
 
Posts: 5
Default convert second to date and time

Thx Bob,

in fact i would like to have in E1 something like a date e.g : 16.02.2006

and in F1 something like a time e.g : 14:12:27

Al.

Bob Phillips wrote:
This gets the number of years assuming that value is in A1

=DATEDIF(--"1970-01-01",--"1970-01-01"+A1/24/60/60,"Y")

How do you want the answer?

  #5  
Old December 8th, 2006, 11:19 AM posted to microsoft.public.excel.worksheet.functions
Bob Phillips
external usenet poster
 
Posts: 1,032
Default convert second to date and time

Ok.

E1: ="1970-01-01"+INT(A1/24/60/60)
F1: =MOD("1970-01-01"+A1/24/60/60,1)

Maybe best to put 01/01/1970 in a cell, such as D1 and use

E1: = D1+INT(A1/24/60/60)
F1: = =MOD(D1+A1/24/60/60,1)

Format E1 as date, and F1 as time.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"--== Alain ==--" wrote in message
...
Thx Bob,

in fact i would like to have in E1 something like a date e.g : 16.02.2006

and in F1 something like a time e.g : 14:12:27

Al.

Bob Phillips wrote:
This gets the number of years assuming that value is in A1

=DATEDIF(--"1970-01-01",--"1970-01-01"+A1/24/60/60,"Y")

How do you want the answer?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.