web
You’re offline. This is a read only version of the page.
close
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;
}

I have the same question (0)
  • Martin Dráb Profile Picture
    237,990 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
    237,990 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
    237,990 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 490 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans