Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default excel converts date/time value to exponential value

Hi,

I have a CSV file that was exported by a database. However, when I
import this csv to excel, I see that the date/time value seems to have
changed to an exponential value. For example,
20060602084140 is converted to 2.00606E+13.

1. Why is this happening?
2. Can I convert 20060602084140 to a regular date / time value?

Thanks in advance,
-V

  #2   Report Post  
Posted to microsoft.public.excel.misc
Heather Heritage
 
Posts: n/a
Default excel converts date/time value to exponential value

It's because the value is a VERY long value, without date seperators -
import it as text, then use date serial with MID to reformat it (in a
holding column)
wrote in message
oups.com...
Hi,

I have a CSV file that was exported by a database. However, when I
import this csv to excel, I see that the date/time value seems to have
changed to an exponential value. For example,
20060602084140 is converted to 2.00606E+13.

1. Why is this happening?
2. Can I convert 20060602084140 to a regular date / time value?

Thanks in advance,
-V



  #3   Report Post  
Posted to microsoft.public.excel.misc
Fred Smith
 
Posts: n/a
Default excel converts date/time value to exponential value

You can convert your number to a date/time with the formula:

=date(left(a1,4),mid(a1,5,2),mid(a1,7,2))+time(mid (a1,9,2),mid(a1,11,2),right(a1,2))

--
Regards,
Fred


wrote in message
oups.com...
Hi,

I have a CSV file that was exported by a database. However, when I
import this csv to excel, I see that the date/time value seems to have
changed to an exponential value. For example,
20060602084140 is converted to 2.00606E+13.

1. Why is this happening?
2. Can I convert 20060602084140 to a regular date / time value?

Thanks in advance,
-V



  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default excel converts date/time value to exponential value

One more if you can insert a helper column and use a formula:

=--TEXT(A1,"0000\/00\/00 00\:00\:00.000")

Format that cell as mm/dd/yyyy hh:mm:ss.000
(or whatever date format you want)

wrote:

Hi,

I have a CSV file that was exported by a database. However, when I
import this csv to excel, I see that the date/time value seems to have
changed to an exponential value. For example,
20060602084140 is converted to 2.00606E+13.

1. Why is this happening?
2. Can I convert 20060602084140 to a regular date / time value?

Thanks in advance,
-V


--

Dave Peterson
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
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
Open Excel 2003 from Windows Explorer pmpjr Excel Discussion (Misc queries) 9 September 11th 06 03:58 PM
Why if I type in 51570.6213 Excel converts it to 51570.5213999999 chd Excel Discussion (Misc queries) 5 April 9th 06 02:51 AM
cell format for date/time in same cell excel 2003 Sandy Excel Worksheet Functions 1 January 18th 06 03:46 AM
Using Excel converts number to english text Lionel Lim (Malaysia) Excel Worksheet Functions 1 April 22nd 05 10:16 PM


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

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"