convert string to date & time

  • Thread starter Thread starter n191975
  • Start date Start date
N

n191975

Hello

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

20061011104657


How can I do this? Thanks
 
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))
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top