Manage Learn to apply best practices and optimize your operations.

# Specific day of the month

## If you've ever had to determine a specific day of the month, for example the third Tuesday or the first Thursday, then this formula can help you out.

If you've ever had to determine a specific day of the month, for example the third Tuesday or the first Thursday, then this formula can help you out. It was designed to determine an upcoming specified day of the month, but can be easily altered to determine the specified day for any date input by replacing the @Now with your date.
```REM "Enter cardinal number of the
ordinal you want.  (eg. "first" = 1, "third" = 3)";
ordinal := 3;
REM "Enter the numeric day of the week
(dow). ("Sunday" = 1 to "Saturday" = 7)";
reqdow := 3;
REM "========== End Developer Changes
==================";
minday := ((ordinal -1) * 7) + 1;
curyear := @Year(@Now);
curmonth := @Month(@Now);
curday := @Day(@Now);
curdow := @Weekday(@Date( curyear ;
curmonth ; minday));
curreqday := @If(curdow > reqdow; 8 -
curdow + minday; reqdow - curdow + minday);

REM "If the date has already passed for
this month, repeat with the next month";
@If(curday > curreqday;
@Do(
@If(curmonth = 12;
@Set("curyear"; curyear + 1);
"");
@Set("curmonth"; @If(curmonth =12; 1;
curmonth + 1));
@Set("curdow"; @Weekday(@Date(
curyear ; curmonth ; minday)));
@Set("curreqday"; @If(curdow > reqdow;
(reqdow + 7) - curdow + minday; reqdow -
curdow + minday))
);
"");
REM "End getting next month's date";

specday := @Date(curyear; curmonth; curreqday);
@If(@Text(specday) = ""; @Error; specday)
```

## SearchWindowsServer

• ### Exchange Server bugs continue to bite on April Patch Tuesday

Microsoft resolves 110 vulnerabilities, including a zero-day and four public disclosures, but the company says admins should ...

• ### Azure MFA NPS extension boosts authentication capabilities

With help from the Network Policy Server extension, organizations can expand their on-premises authentication features by tapping...

• ### Azure File Sync service puts pep in hybrid storage setups

Microsoft's Azure Files offering alleviates traditional support efforts and hardware costs. Using this additional service can ...

## Search400

• ### Favorite iSeries cheat sheets

Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

• ### HTML cheat sheet

This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

• ### Carol Woodbury: Security

Carol Woodbury

## SearchDataCenter

• ### Programmable processor technology for next-gen data centers

The right processing technology can benefit your data center. Learn about advancements in CPU technologies, recent vendor ...

• ### Data processing units accelerate infrastructure performance

DPUs often run on networking packets to move information in the data center, instead of supporting processing workflows. Get an ...

• ### New Intel Ice Lake processors boost performance, security

Intel launches third-generation Xeon Scalable processors that bolster security, accelerate common data center workloads by 46% on...

## SearchContentManagement

• ### OpenText releases Cloud Editions content services updates

OpenText CE 21.2 includes federated document compliance that extends to Microsoft Office 365, along with a revamped content ...