Home : NDM
Q10740 - INFO: NDM

NDM returns the Number of Days in a Month or the number of specified weekdays in a month.

SYNTAX:

NDM(MonthOffset/Date, optional Weekdays)

MonthOffset/Date: If a number it is the Zero based offset from the Start Date of the report. If this field is a date string (i.e. "07/16/2004") or refers to a cell with a date in it, it sets the month to calculate for

Common values:

0 = Current month
1 = One month after current month
2 = Two months after current month

Weekdays: Optional parameter.  If omitted function returns the total number of days in the month.  Is a string that specifies which days of the week to count.  You can combine strings to count more than one weekdays.  "MW" counts Mondays and Wednesdays in the month. 

Su - Sunday
M - Monday
Tu - Tuesday
W - Wednesday
Th - Thursday
F - Friday
Sa - Saturday

 

EXAMPLES:

Start Date of Report is 12/01/2014

Formula  Returns  Explanation
NDM(0) 31

Current month is December 2014 which has 31 days.

NDM(1,"M") One (1) month after start month of report is Jan 2015 which has 4 Mondays. 
NDM("1/1/2001") 31 

Janurary 2001 has 31 days.

NDM(B5) 28

B5 displays 2/1/2015 (Feb 1st 2015) which has 28 days.

Download Example Template: Help_NDM_Examples.hwr (Click here for download instructions)

See Also: GNOS to count the number of samples and GSV to test for missed samples.

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 2/11/2008 9:54 PM.
Last Modified on 1/29/2015 3:19 PM.
Last Modified by Scott Dorner.
Article has been viewed 3798 times.
Rated 8 out of 10 based on 4 votes.
Print Article
Email Article