Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default convert string to date & time

Hello

I have the following string that I need to convert into Date & time.

20061011104657


How can I do this? Thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 618
Default convert string to date & time

With your input in A1, use the formula:
=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))
--
David Biddulph

wrote in message
ups.com...
Hello

I have the following string that I need to convert into Date & time.

20061011104657

How can I do this? Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default convert string to date & time

Let's assume your string is in A1. Try this:

=DATE(LEFT(A1,4),MID(A1,5,2),MID(A1,7,2))+TIME(MID (A1,9,2),MID(A1,11,2),RIGHT(A1,2))

The cell your formula is in will need to be formatted appropriately to
display date & time.

HTH,
Elkar




" wrote:

Hello

I have the following string that I need to convert into Date & time.

20061011104657


How can I do this? Thanks


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default convert string to date & time

Thanks a lot for your help. It works.


Elkar wrote:
Let's assume your string is in A1. Try this:

=DATE(LEFT(A1,4),MID(A1,5,2),MID(A1,7,2))+TIME(MID (A1,9,2),MID(A1,11,2),RIGHT(A1,2))

The cell your formula is in will need to be formatted appropriately to
display date & time.

HTH,
Elkar




" wrote:

Hello

I have the following string that I need to convert into Date & time.

20061011104657


How can I do this? Thanks



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 340
Default convert string to date & time

Or enter:

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



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
Time and Date stamp - Pivot Chart Bemidji Excel Discussion (Misc queries) 6 October 25th 06 02:50 PM
convert string to date Sean Excel Worksheet Functions 5 March 1st 06 09:54 PM
convert interval to various separate date , time, hr, minutes Todd F. Excel Worksheet Functions 4 July 12th 05 07:25 PM
Imported Date & Time format with calcs. managed in excel from imrp Todd F. Excel Worksheet Functions 0 July 8th 05 09:03 PM
Automatically enter date and time but only update once. PM New Users to Excel 3 January 21st 05 07:47 AM


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

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"