Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Return quarter for give date in AX - 2009/D365FO (date2Qtr)

(0) ShareShare
ReportReport
Posted on by 35

Class available in AX2009/D365 

MicrosoftTeams_2D00_image-_2800_8_2900_.png

Quarter date2Quarter(date _date)
{
    int     intQuarter = date2Qtr(_date);
    Quarter quarter;

    switch(intQuarter)
    {
        case 1:
            quarter = Quarter::Q1;
            break;
        case 2:
            quarter = Quarter::Q2;
            break;
        case 3:
            quarter = Quarter::Q3;
            break;
        case 4:
            quarter = Quarter::Q4;
            break;
    }

    return quarter;
}

  • Martin Dráb Profile Picture
    232,011 Most Valuable Professional on at
    RE: Return quarter for give date in AX - 2009/D365FO (date2Qtr)

    What kind of information would you like to get about date2qtr()? We can't give you link that will answer your questiions if you keep refusing to tell us what questions you have.

  • Prasanna Munasinghe Profile Picture
    35 on at
    RE: Return quarter for give date in AX - 2009/D365FO (date2Qtr)

    Is there any blog or link related to this date2qtr functions.

    Thanks.

  • Martin Dráb Profile Picture
    232,011 Most Valuable Professional on at
    RE: Return quarter for give date in AX - 2009/D365FO (date2Qtr)

    If yu have no question, than what do you want to discuss?

    If you actually have nothing to discuss and you just want to share some information, than use a blog instead of a discuss forum. And there you'll also need to provide some text, not just a piece of code without any context or explanation.

  • Prasanna Munasinghe Profile Picture
    35 on at
    RE: Return quarter for give date in AX - 2009/D365FO (date2Qtr)

    Hi Martin,

    Thanks for your respond.

    Updated post with code.

    This forum under discussion, not question.

    Thanks.

  • Martin Dráb Profile Picture
    232,011 Most Valuable Professional on at
    RE: Return quarter for give date in AX - 2009/D365FO (date2Qtr)

    Prasanna, you shared a screenshot and a piece of code, but no text. Please explain what kind of assistence you need from the community regarding this code.

    Also, please use Insert > Code to paste source code, as I already told you last time. You lost line indentation exactly because you forget this step.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,011 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans