Hello,
I have a date/time stamp stored as text in A1 "Tuesday, September 19, 2017 10:00 PM (IMP)"
i want to separate it in four columns >> Tue, 19-Sep-2017, 10:00 PM, IMP
I used datedif but its not working. please help me convert this.
Thanks
Hello,
I have a date/time stamp stored as text in A1 "Tuesday, September 19, 2017 10:00 PM (IMP)"
i want to separate it in four columns >> Tue, 19-Sep-2017, 10:00 PM, IMP
I used datedif but its not working. please help me convert this.
Thanks
hi sabha. you probably need to upload a sample excel file which has more egs and your desired outcome. otherwise, you would have different scenarios that we need to guess. right now, it looks like you can do this in B1:
=LEFT(A1,FIND(",",A1)-1)
C1:
=--LEFT(SUBSTITUTE(A1,B1&", ",""),SEARCH("???? ??:",SUBSTITUTE(A1,B1&", ",""))+3)
D1:
=--TRIM(MID(A1,FIND(":",A1)-2,8))
E1:
=SUBSTITUTE(MID(A1,FIND("(",A1)+1,LEN(A1)),")","")
format the cells accordingly as date or time
Thanks, if you have clicked on the * and added our rep.
If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".
"Contentment is not the fulfillment of what you want, but the realization of what you already have."
Tips & Tutorials I Compiled | How to Get Quick & Good Answers
If I understand correctly try this formula in B1 and fill across to D1. Format as "ddd", "d-mmm-yyyy", and "h:mm AM/PM".Then in E1 this formula.Formula:
Please Login or Register to view this content.Formula:
Please Login or Register to view this content.
A B C D E 1 Tuesday, September 19, 2017 10:00 PM (IMP) Tue 19-Sep-2017 10:00 PM IMP
Dave
Sorry for the incomplete sample. My data is not so large so i am not uploading a sample file. Listing below what I have in range A1:A28
Tuesday, September 19, 2017 10:00 PM (IMP)
Saturday, April 22, 2017 10:00 PM (IMP)
Saturday, August 26, 2017 10:00 PM (ORD)
Saturday, February 25, 2017 10:00 PM (ORD)
Saturday, January 28, 2017 10:00 PM (SAM)
Saturday, July 01, 2017 10:00 PM (SAM)
Saturday, June 03, 2017 10:00 PM (SAM)
Saturday, March 18, 2017 10:00 PM (ORD)
Saturday, May 06, 2017 10:00 PM (SAM)
Saturday, September 16, 2017 10:00 PM (IMP)
Thursday, April 20, 2017 10:00 PM (SAM)
Thursday, August 17, 2017 10:00 PM (ORD)
Thursday, February 23, 2017 10:00 PM (SAM)
Thursday, January 12, 2017 10:00 PM (IMP)
Thursday, July 20, 2017 10:00 PM (SAM)
Thursday, June 22, 2017 10:00 PM (ORD)
Thursday, March 23, 2017 10:00 PM (SAM)
Thursday, May 04, 2017 10:00 PM (SAM)
Thursday, September 07, 2017 10:00 PM (IMP)
Tuesday, April 25, 2017 10:00 PM (SAM)
Tuesday, August 29, 2017 10:00 PM (ORD)
Tuesday, February 14, 2017 10:00 PM (ORD)
Tuesday, January 03, 2017 10:00 PM (ORD)
Tuesday, July 04, 2017 10:00 PM (IMP)
Tuesday, June 27, 2017 10:00 PM (SAM)
Tuesday, March 28, 2017 10:00 PM (SAM)
Tuesday, May 30, 2017 10:00 PM (ORD)
Tuesday, September 05, 2017 10:00 PM (IMP)
It works at my end. See attached.
Are there regional settings differences eg "," for ";" argument separators?
Last edited by sabha; 09-21-2017 at 05:23 AM. Reason: added excel version
and did you try my solutions in post #2?
Here is the screenshot of my regional settings
regional.png
Hi,
Try the following:
In B1:
In C1:![]()
Please Login or Register to view this content.
In D1:![]()
Please Login or Register to view this content.
In E1:![]()
Please Login or Register to view this content.
See the attached file.![]()
Please Login or Register to view this content.
Here's a site that addresses this. It is Version 1707.
https://social.msdn.microsoft.com/Fo...forum=exceldev
Here is another one
Enter in B1 and drag formula across to cell F1 and copy down
Format Col D as Custom, dd-mmm-yyyy and format Col E as Custom, hh:mm AM/PM
Formula:
Please Login or Register to view this content.
v A B C D E F 1 Tuesday, September 19, 2017 10:00 PM (IMP) Tue Sep 19-Sep-2017 10:00 PM IMP 2 Tuesday, September 19, 2017 10:00 PM (IMP) Tue Sep 19-Sep-2017 10:00 PM IMP 3 Saturday, April 22, 2017 10:00 PM (IMP) Sat Apr 22-Apr-2017 10:00 PM IMP 4 Saturday, August 26, 2017 10:00 PM (ORD) Sat Aug 26-Aug-2017 10:00 PM ORD 5 Saturday, February 25, 2017 10:00 PM (ORD) Sat Feb 25-Feb-2017 10:00 PM ORD 6 Saturday, January 28, 2017 10:00 PM (SAM) Sat Jan 28-Jan-2017 10:00 PM SAM 7 Saturday, July 01, 2017 10:00 PM (SAM) Sat Jul 01-Jul-2017 10:00 PM SAM 8 Saturday, June 03, 2017 10:00 PM (SAM) Sat Jun 03-Jun-2017 10:00 PM SAM 9 Saturday, March 18, 2017 10:00 PM (ORD) Sat Mar 18-Mar-2017 10:00 PM ORD 10 Saturday, May 06, 2017 10:00 PM (SAM) Sat May 06-May-2017 10:00 PM SAM 11 Saturday, September 16, 2017 10:00 PM (IMP) Sat Sep 16-Sep-2017 10:00 PM IMP 12 Thursday, April 20, 2017 10:00 PM (SAM) Thu Apr 20-Apr-2017 10:00 PM SAM 13 Thursday, August 17, 2017 10:00 PM (ORD) Thu Aug 17-Aug-2017 10:00 PM ORD 14 Thursday, February 23, 2017 10:00 PM (SAM) Thu Feb 23-Feb-2017 10:00 PM SAM 15 Thursday, January 12, 2017 10:00 PM (IMP) Thu Jan 12-Jan-2017 10:00 PM IMP 16 Thursday, July 20, 2017 10:00 PM (SAM) Thu Jul 20-Jul-2017 10:00 PM SAM 17 Thursday, June 22, 2017 10:00 PM (ORD) Thu Jun 22-Jun-2017 10:00 PM ORD 18 Thursday, March 23, 2017 10:00 PM (SAM) Thu Mar 23-Mar-2017 10:00 PM SAM
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
another option (for Ex2010, 2013 with PowerQuery add-in or Ex2016 with PQ built-in)
Last edited by sandy666; 09-22-2017 at 02:55 AM. Reason: file update
Here is step-by-step:
Welcome![]()
Please Login or Register to view this content.
![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks