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

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Get all calendar dates

    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

  • Blue Wang Profile Picture
    on at
    RE: Get all calendar dates

    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?

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: Get all calendar dates

    Hi Srinivas,

    Could you please describe your exact requirement here?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March 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... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,013 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans