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 :
Microsoft Dynamics AX (Archived)

How to get first and last day of the month?

(0) ShareShare
ReportReport
Posted on by

Hi all, 

How can I get dates, when I have month?

I have dte 22.02.2019 and I know, that this if February (mthOfYr(d)).

I need first day and last day of month 0 01.02.2019 and 28.02.2019, becouse I must compare this dates.

Or maybe other method to 'if my date exist in february'? :) 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Blue Wang Profile Picture
    Microsoft Employee on at
  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    You can always get the first day of month by substracting the dayOfMth from your date.

    And you can use endMth function to get the last day of the month, from the date you provide.

  • Suggested answer
    faiz7049 Profile Picture
    2,430 on at

    Hi Andriej,

    Kindly check this link blogs.msdn.microsoft.com/.../using-dynamic-query-values-sysqueryrangeutil-in-dynamics-ax 

    and also link http://mybhat.blogspot.com/2011/09/dynamics-ax-batch-job-relative-day.html

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans