Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

first day and last day of each month

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    first day and last day of each month

    hello,

    I would like to know the first day and last day of each month.
    For the week, the role exists, DayOfWeek.
    Is there a way of knowing this for months.

    thank you

    #2
    Not sure what you mean. Just run the DateTime with a date of 9/1 for instance and then use .DayOfWeek on it and it will give you the day it is.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I'll take an example.
      I must make a DrawDot, one early and one at the end of each month.
      How to detect the first day and last jor each month.

      Comment


        #4
        Just check the dates. If the date is 1 or 30/31 then it is beginning/end of month
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          ... 30/31 is near at the truth already. The save way to find the last day of this month should go like this:

          DateTime LastOfSep2009 = new DateTime(2009, 10, 1).AddDays(-1);

          Regards
          Ralph

          Comment


            #6
            yes,
            thank you very much

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            581 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            338 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            554 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            552 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X