Get quarter from date element

marioms

Member
Hello peeps!

I want to create a calc element called Quarter that will give back the Quarter of the year based on what is chosen on the Date element. It's a quite straight idea but my php/coding really sucks, any idea how I could achieve this?

Thanks in advance!
 
Something like ...

Code:
$myDate = new DateTime('{yourtable___yourdate_raw}');
$myMonth = $myDate->format("m");
return ceil($myMonth/3);

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top