Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Change to day format

Hello:

I have import a text file that the Raw Data is "20070722130054". How
can I make the excel to recognize as "2007-07-22 13:00:54"?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Change to day format

Assuming your value is in A2, but this in B2:

=DATE(LEFT(A2,4),MID(A2,5,2),MID(A2,7,2))
+VALUE(MID(A2,9,2)&":"&MID(A2,11,2)&":"&RIGHT(A2,2 ))

Format the cell as Custom -- yyyy-mm-dd hh:mm:ss, then copy the
formula down.

Hope this helps.

On Jul 25, 11:02 am, Blue Fish wrote:
Hello:

I have import a text file that the Raw Data is "20070722130054". How
can I make the excel to recognize as "2007-07-22 13:00:54"?

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Change to day format

In a helper column:

try:

=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))

Assuming text field is in A1 (etc)

format as CUSTOM: yyyy-mm-dd hh:mm:ss

Then copy/paste special-values in your helper column.

HTH

"Blue Fish" wrote:

Hello:

I have import a text file that the Raw Data is "20070722130054". How
can I make the excel to recognize as "2007-07-22 13:00:54"?

Thanks!

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
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
Use date modified to change format & create filter to track change PAR Excel Worksheet Functions 0 November 15th 06 09:17 PM
excel numbers in general format i cant add cant change format claude Excel Worksheet Functions 2 July 7th 06 08:18 PM
Change number (in text format) to numeric format Pam Excel Discussion (Misc queries) 5 October 24th 05 07:45 PM
How do i change numbers in text format to number format? Greg New Users to Excel 1 December 14th 04 05:22 PM


All times are GMT +1. The time now is 01:24 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"