![]() |
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 |
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 |
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 |
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 |
convert string to date & time
Or enter:
=--TEXT(A1,"0000-00-00 00\:00\:00") |
All times are GMT +1. The time now is 07:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com