#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Date Conversion

I import a date from another program which converts the date from 12/19/2008
to 1,229,666,400. How do I get excel to convert it back?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Date Conversion

=A1/(24*60*60)+DATE(1970,1,1)
--
David Biddulph

mecca wrote:
I import a date from another program which converts the date from
12/19/2008 to 1,229,666,400. How do I get excel to convert it back?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Date Conversion

=DATE(1970,1,1)+A1/86400

This includes a *time*.

39801.25 when formatted is 12/19/2008 6:00 AM

If you want only the date portion:

=INT(DATE(1970,1,1)+A1/86400)

Format as date = 12/19/2008

--
Biff
Microsoft Excel MVP


"mecca" wrote in message
...
I import a date from another program which converts the date from
12/19/2008
to 1,229,666,400. How do I get excel to convert it back?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Date Conversion

We need more examples to be able to work out how 12/19/2008 became
1,229,666,400.
Or do you know the algorithm?
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"mecca" wrote in message
...
I import a date from another program which converts the date from



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Date Conversion

mecca wrote:
I import a date from another program which converts the date from 12/19/2008
to 1,229,666,400. How do I get excel to convert it back?


With 1,229,666,400 in A1, put this in B1 and format it as date:

=A1-1229626599

But that might only work for this particular example. If so, maybe if you
provided a few other data points someone could figure it out.


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Date Conversion

So, 1,229,666,400 is the number of seconds since January 1st, 1970?

David Biddulph wrote:
=A1/(24*60*60)+DATE(1970,1,1)
--
David Biddulph

mecca wrote:
I import a date from another program which converts the date from
12/19/2008 to 1,229,666,400. How do I get excel to convert it back?



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Date Conversion

You can save a function call by using a date text string...

Date plus time: ="1/1/1970"+A1/86400

Date only: =INT("1/1/1970"+A1/86400)

--
Rick (MVP - Excel)


"T. Valko" wrote in message ...
=DATE(1970,1,1)+A1/86400

This includes a *time*.

39801.25 when formatted is 12/19/2008 6:00 AM

If you want only the date portion:

=INT(DATE(1970,1,1)+A1/86400)

Format as date = 12/19/2008

--
Biff
Microsoft Excel MVP


"mecca" wrote in message
...
I import a date from another program which converts the date from
12/19/2008
to 1,229,666,400. How do I get excel to convert it back?



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Date Conversion

Presumably standard Unix time?
--
David Biddulph

Glenn wrote:
So, 1,229,666,400 is the number of seconds since January 1st, 1970?

David Biddulph wrote:
=A1/(24*60*60)+DATE(1970,1,1)
--
David Biddulph

mecca wrote:
I import a date from another program which converts the date from
12/19/2008 to 1,229,666,400. How do I get excel to convert it back?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Conversion Toria Excel Discussion (Misc queries) 3 February 24th 08 03:24 AM
date conversion ranvin56 Excel Discussion (Misc queries) 2 January 3rd 08 09:50 PM
Date Conversion Port Man Excel Discussion (Misc queries) 6 March 2nd 07 12:55 AM
Date Conversion Port Man Excel Discussion (Misc queries) 2 March 1st 07 06:40 PM
Date Conversion - sorry DTTODGG New Users to Excel 5 December 13th 05 07:36 PM


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

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

About Us

"It's about Microsoft Excel"