Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to calculate first or last given day of the week in a month

Status
Not open for further replies.

tektipdjango

IS-IT--Management
Jan 28, 2004
188
eg find first Tuesday in a month, or find last friday in a month...
I wrote a FAQ about this

--------------------------------------------------
[highlight]Django[/highlight] [thumbsup]
bug exterminator
tips'n tricks addict
 
An easier trick to getting the last Friday of a month is to get the first Friday (with tektipdjango's method) of the next month and subtract 7.
Secretaries Day is a good example. It's the last Wednesday in April that is within the last full week of April (Sunday thru Saturday). So find the first Saturday of May and subtract 10.
-Karl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top