Generate Attribute Quarter from Date

WhiteBeard
WhiteBeard New Altair Community Member
edited November 5 in Community Q&A
Trying to create attribute to have Quarter from a date attribute. Getting Month number using  "date_get([Date Inserted],DATE_UNIT_MONTH,"GMT")+1"

but not able to convert or calculate Quarter. 

Thank you.

Best Answer

  • WhiteBeard
    WhiteBeard New Altair Community Member
    Answer ✓
    Found the solution.
    str(floor((date_get([Date Attribute],DATE_UNIT_MONTH,"GMT")/3)+1))

Answers

  • WhiteBeard
    WhiteBeard New Altair Community Member
    Answer ✓
    Found the solution.
    str(floor((date_get([Date Attribute],DATE_UNIT_MONTH,"GMT")/3)+1))