+ Reply to Thread
Results 1 to 4 of 4

Excel Date Time to Unix Time

  1. #1
    jnorton
    Guest

    Excel Date Time to Unix Time

    I have a field in Excel which is formatted as 4/21/2005 10:43
    I am uploading this feild into mysql I need the datetime to be converted to
    unix time
    like 1116910800 any ideas?

  2. #2
    Bob Phillips
    Guest

    Re: Excel Date Time to Unix Time

    =TEXT( A1*86400-DATE(1970,1,1)*24*60*60,"0000000000")

    I have texted it as it is too long for an Excel number display

    --
    HTH

    Bob Phillips

    "jnorton" <[email protected]> wrote in message
    news:[email protected]...
    > I have a field in Excel which is formatted as 4/21/2005 10:43
    > I am uploading this feild into mysql I need the datetime to be converted

    to
    > unix time
    > like 1116910800 any ideas?




  3. #3
    JE McGimpsey
    Guest

    Re: Excel Date Time to Unix Time

    Unix time is the number of seconds after 1 January 1970. XL stores times
    as fractional days, so you need to mutiply that elapsed time by
    (60*60*24) or 86400.


    =(A1-DATE(1970,1,1))*86400

    Though your example Unix time is

    05/24/2005 05:00:00





    In article <[email protected]>,
    "jnorton" <[email protected]> wrote:

    > I have a field in Excel which is formatted as 4/21/2005 10:43
    > I am uploading this feild into mysql I need the datetime to be converted to
    > unix time
    > like 1116910800 any ideas?


  4. #4
    JE McGimpsey
    Guest

    Re: Excel Date Time to Unix Time

    ????

    It's only 10 digits.


    In article <ekxU##[email protected]>,
    "Bob Phillips" <[email protected]> wrote:

    > I have texted it as it is too long for an Excel number display


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1