Hi,
I have got a series of values like 21 Jul 2010 07:12PM which i would like to convert into date formate in Excel.
Exmaple:
21 Jul 2010 07:12PM
to
dd/mm/yyyy (21/07/2010)
Any help would be appriciate.
Thanks
Hi,
I have got a series of values like 21 Jul 2010 07:12PM which i would like to convert into date formate in Excel.
Exmaple:
21 Jul 2010 07:12PM
to
dd/mm/yyyy (21/07/2010)
Any help would be appriciate.
Thanks
Last edited by dpatel; 07-23-2010 at 06:47 AM.
Assuming those are text strings:
=INT(SUBSTITUTE(SUBSTITUTE(A1,"PM"," PM"),"AM"," AM")*1)
Dom
"May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."
Use code tags when posting your VBA code: [code] Your code here [/code]
Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.
Thanks Dom, this will work for me but how can we convert to read as a "Date format (dd/mm/yyyy)" using same formula rather than changing a format cell to date?
Dipesh
Hi,
How about
=TEXT(INT(SUBSTITUTE(SUBSTITUTE(A1,"PM"," PM"),"AM"," AM")*1),"dd/mm/yyyy")
oldchippy
-------------
Blessed are those who can give without remembering and take without forgetting
If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.
Click here >>> Top Excel links for beginners to Experts
Forum Rules >>>Please don't forget to read these
In terms of the formula you could I think (based on your sample) you could also use:
=0+LEFT(A1,LEN(A1)-7)
Format cell as dd/mm/yyyy or if you want the above as literal string rather than a date
=TEXT(LEFT(A1,LEN(A1)-7),"dd/mm/yyyy")
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Thanks guys, All soluations worked with Charm!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks