ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   excel converts date/time value to exponential value (https://www.excelbanter.com/excel-discussion-misc-queries/92470-excel-converts-date-time-value-exponential-value.html)

[email protected]

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


Heather Heritage

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




Fred Smith

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




Dave Peterson

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


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com