Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jnorton
 
Posts: n/a
Default 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   Report Post  
Bob Phillips
 
Posts: n/a
Default

=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" wrote in message
...
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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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 ,
"jnorton" 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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

????

It's only 10 digits.


In article ,
"Bob Phillips" wrote:

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

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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Excel file modification date GROSNER Excel Discussion (Misc queries) 5 March 4th 05 01:19 AM
Remove time from a date and time field? Format removes the displa. oaoboc Excel Worksheet Functions 1 February 16th 05 07:20 PM
Help wtih date and time in the same cell Michaela Excel Worksheet Functions 3 February 9th 05 09:49 PM
Creating a Date Selector in Excel VBA? Mark Excel Discussion (Misc queries) 0 November 25th 04 10:59 PM


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

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

About Us

"It's about Microsoft Excel"