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

Get all calendar dates

(0) ShareShare
ReportReport
Posted on by 415

Hi All,

How can i get all dates in x++

example.

1/1/2020
1/2/2020
1/3/2020
1/4/2020
1/5/2020
1/6/2020
1/7/2020
1/8/2020
1/9/2020
1/10/2020

Please guide me.

Regards,

Srinivas

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Srinivas,

    Could you please describe your exact requirement here?

  • Blue Wang Profile Picture
    on at

    Hi Srinivas,

    You can try to use DateTimeUtil::getStartOfYearDate method, then print iteratively.

    date startDate, endDate;
    xSession xSession = new xSession();
    startDate = DateTimeUtil::getStartOfYearDate(xSession.preferredLocale(), DateTimeUtil::getToday(DateTimeUtil::getUserPreferredTimeZone()));
    

    5280.PNG

    What is your needs?

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Good morning Srinivas,

    There have been a couple of responses provided but I have not seen the question of Gunjan answered.

    Why do you need to grab those dates by X++?

    Would be great if you could explain.

    Many thanks and best regards,

    Ludwig

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... 456 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans