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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

First and Last date of month

(0) ShareShare
ReportReport
Posted on by 142

How to calculate first and last month date uisng Javascript in model driven powerapp?

I have the same question (0)
  • Suggested answer
    Ray Profile Picture
    1,537 on at

    var my_date = new Date(); // maybe you need a certain month, then use this: var my_date = new Date("2018, Jan");

    var first_date = new Date(my_date.getFullYear(), my_date.getMonth(), 1);

    console.log(first_date);

    var last_date = new Date(my_date.getFullYear(), my_date.getMonth() + 1, 0);

    console.log(last_date);

  • Sumedha Profile Picture
    142 on at

    It's working . Thank you!

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 166 Super User 2026 Season 1

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 51 Most Valuable Professional

#2
NeerajPawar Profile Picture

NeerajPawar 51

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans