Hi everyone,
I have done some research, but couldn't find the answer to the following issue.
Dataset examplet:
production_start production_end quarter
02apr2007 31dec2011 2009q1
14jan2001 31dec2009 2009q2
18sept1997 21apr2005 2005q2
14oct2005 13mar2008 2005q2

I would like to generate a new variable pdays_q (production days in quarter), which would reflect how many days in the quarter is the factory working.
Thank you!