How do I convert date/time stamps to quarters (Q1, Q2, etc...)?

Hi,

How can I convert 08/18/17 04:31PM EDT to quarters (Q1, Q2, etc...)?

Thanks.
Jason KylesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Professor JMicrosoft Excel ExpertCommented:
lets say your date is in A1  then put ="Q"&ROUNDUP(MONTH(A1)/3,0)
Bill PrewIT / Software Engineering ConsultantCommented:
If you have a date field in A2 then try these approaches.  The first just gives the quarter with a "Q", the other includes the year in a slightly different format.  Adjust as needed.

=CONCATENATE("Q",ROUNDUP(MONTH(A2)/3,0))

=CONCATENATE(ROUNDUP(MONTH(A2)/3,0),"Q",YEAR(A2))



»bp
Jason KylesAuthor Commented:
Thank you. Both solutions suggested work well when I remove the time zone. Unfortunately the javascript export is in this format and I would like a one step conversion solution, but I'm fine with 2 steps if the first one removes the timezone (EDT).
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Professor JMicrosoft Excel ExpertCommented:
if you want to remove time from it then first step should be  =TEXT(INT(A1),"MM/DD/YY")  this removes the time
Bill PrewIT / Software Engineering ConsultantCommented:
Give these a try, assuming that text string is what's in the A2 cell.

=CONCATENATE("Q",ROUNDUP(MONTH(DATEVALUE(LEFT(A2,FIND(" ",A2))))/3,0))

=CONCATENATE(ROUNDUP(MONTH(DATEVALUE(LEFT(A2,FIND(" ",A2))))/3,0),"Q",YEAR(DATEVALUE(LEFT(A2,FIND(" ",A2)))))



»bp

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jason KylesAuthor Commented:
Thank you, but that did not work. Converting time zone
Professor JMicrosoft Excel ExpertCommented:
please try this ="Q"&ROUNDUP(MONTH(L5)/3,0)&"-"&YEAR(INT(L5))
Jason KylesAuthor Commented:
This works. Thanks, Bill! Converting time zone
Professor JMicrosoft Excel ExpertCommented:
please try this . it will show year as well.

="Q"&ROUNDUP(MONTH(DATEVALUE(LEFT(L6,LEN(L6)-6)))/3,0)&"-"&YEAR(INT(DATEVALUE(LEFT(L6,LEN(L6)-6))))
Bill PrewIT / Software Engineering ConsultantCommented:
Great.


»bp
Jason KylesAuthor Commented:
Thanks, Professor JimJam. This works as well. Converting time zone
Professor JMicrosoft Excel ExpertCommented:
you are welcome.
Jason KylesAuthor Commented:
Sorry. Wrong screenshot, Professor JimJam. Here's the correct one. Capture.PNG
Professor JMicrosoft Excel ExpertCommented:
:)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.