Hi all,
Having trouble with formula to convert a text string to a time & date.
Have attached a sample - am almost there but it's not working.
I think the AM is screwing things up - anyone help please?
Ian
Hi all,
Having trouble with formula to convert a text string to a time & date.
Have attached a sample - am almost there but it's not working.
I think the AM is screwing things up - anyone help please?
Ian
=mid(a2,5,20)+0
or probably
=TEXT(MID(A2,5,20)+0,"dd/mm/yyyy hh:mm")
Regards
Special-K
Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.
Try using the following formula and formatting the cell as m/d/yyyy h:mm
=--REPLACE(A2,1,4,"")
Try this ...
=TEXT(REPLACE(A2,1,4,""),"dd-mm-yyyy hh:mm")
Try
=DATEVALUE(MID(A2,4,12)) + TIMEVALUE(RIGHT(A2,8))
Thanks all - I started with the most recent solution posted by Phuocam and that worked perfectly. Will mark as solved.
Root's is more efficient, as it will leave you with a proper data and time. Phuocam's will leave you with text.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
you've ex365 so you can try PowerQuery, just 2, maybe 3, clicks
I tell a lie, for some reason, John's solution worked best as the one I first used didn't lock a true time value on it (i.e. when I saved as CSV, it didn't switch to numbers, as I expected it would) whereas John's did. Thanks John!
OR,
Try the following in C2:
=--RIGHT(A2,LEN(A2)-4)
Marked solved now, thanks all
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks