Hi All,
Ok, I'm stumped. I can get all manner of date data..but I have not located a way (or even example script) that shows how to retrieve the end of the month.
Why?
I have a master script that runs as a scheduled task. It runs every day and calls other scripts depending on the date. It's fine for things like weekly reports as I just use $dow = {get-date}.DayofWeek but I need to run month end scripts.
I can pop something together that gets the day and then performs some ugly logic based on < or > but I'm sure there is a slicker way to do it.
As always, any help greatly appreciated.
Cheers
Hello, medalklector-
One way to do it it is described by RMToups, Jr. at http://activelydirect.blogspot.com/2011/01/determine-last-day-of-month-in.html. You should be able to adjust the output to fit your requirements. How does that do for you?
Hello, medalklector-
One way to do it it is described by RMToups, Jr. at http://activelydirect.blogspot.com/2011/01/determine-last-day-of-month-in.html. You should be able to adjust the output to fit your requirements. How does that do for you?
Excellent - Thanks very much. That is what I was looking for.
Cheers
