web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Active Discussion

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
    239,647 Most Valuable Professional on at

    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.

  • Prasanna Munasinghe Profile Picture
    35 on at

    Hi Martin,

    Thanks for your respond.

    Updated post with code.

    This forum under discussion, not question.

    Thanks.

  • Martin Dráb Profile Picture
    239,647 Most Valuable Professional on at

    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

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

    Thanks.

  • Martin Dráb Profile Picture
    239,647 Most Valuable Professional on at

    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 692

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 532 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 478

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans