Link to home
Start Free TrialLog in
Avatar of Jason Kyles
Jason Kyles

asked on

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.
Avatar of Professor J
Professor J

lets say your date is in A1  then put ="Q"&ROUNDUP(MONTH(A1)/3,0)
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
Avatar of Jason Kyles

ASKER

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).
if you want to remove time from it then first step should be  =TEXT(INT(A1),"MM/DD/YY")  this removes the time
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you, but that did not work. User generated image
please try this ="Q"&ROUNDUP(MONTH(L5)/3,0)&"-"&YEAR(INT(L5))
This works. Thanks, Bill! User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great.


»bp
Thanks, Professor JimJam. This works as well. User generated image
you are welcome.
Sorry. Wrong screenshot, Professor JimJam. Here's the correct one. User generated image