convert string to date & time

N

n191975

Hello

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

20061011104657


How can I do this? Thanks
 
D

David Biddulph

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

Elkar

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
 
N

n191975

Thanks a lot for your help. It works.

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
 
Top