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 :
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
    on at
  • Suggested answer
    nmaenpaa Profile Picture
    101,162 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,382 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

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

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans