ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   mySQL timestamp to readable format (https://www.excelbanter.com/excel-discussion-misc-queries/125900-mysql-timestamp-readable-format.html)

[email protected]

mySQL timestamp to readable format
 
How would I go about doing this? The format is 20070112130325, so
basically YYYYMMDDhhmmss. Does Excel have anything built in to convert
this to a readable format or do I have to parse it to format it?


Dave F

mySQL timestamp to readable format
 
You have to parse it.

Assume 20070112130325 is in A1.

=LEFT(A1,4) = 2007
=MID(A1,5,2) = 01 -- repeat this formula, increasing the 5 by the number of
characters, from left to right, you want to start at for each additional
extraction. The 2 is the number of characters you want to extract.

If you have a lot of these numbers, then just copy the formulas down as
necessary

Dave
--
Brevity is the soul of wit.


" wrote:

How would I go about doing this? The format is 20070112130325, so
basically YYYYMMDDhhmmss. Does Excel have anything built in to convert
this to a readable format or do I have to parse it to format it?



David Biddulph

mySQL timestamp to readable format
 
You could do it by
=DATE(LEFT(A1,4),MID(A1,5,2),MID(A1,7,2))+TIME(MID (A1,9,2),MID(A1,11,2),MID(A1,13,2))and format as dd/mm/yyyy hh:mm:ss or as you wish.--David wrote in ooglegroups.com... How would I go about doing this? The format is 20070112130325, so basically YYYYMMDDhhmmss. Does Excel have anything built in to convert this to a readable format or do I have to parse it to format it?



All times are GMT +1. The time now is 02:41 AM.

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