Hey Everyone,
I need a way to accurately calculate how many days in any month of any year. I'm sure there is a mathematical solution, but I don't have any idea what that would be.
Do you?
Or how could I retrieve the number of days for the current month from the web automatically? (contained in a variable)
Thanks!
PepsiHog
BTW - I'm using v11
Determine num of day in each month of the year
Moderators: JRL, Dorian (MJT support)
Determine num of day in each month of the year
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
find number of days in a month using VBScript
Try this:
Code: Select all
VBSTART
Function Days_in_Month(mymonth,myyear)
Days_in_Month = Day(DateSerial(myyear, 1 + mymonth, 0))
End Function
VBEND
//Pass in the month number i.e. 1=January 2=February, etc
//Pass in the year i.e. 2009,2010,etc
VBEval>Days_in_Month(2,2009),result
MessageModal>Days in Month = %result%
ummmm........ How can I say this....
AWESOME!!! DUDE!!
Thanks! adroege!
Works perfectly!
PepsiHog
I'll drink a pepsi on your behalf.
AWESOME!!! DUDE!!
Thanks! adroege!
Works perfectly!
PepsiHog
I'll drink a pepsi on your behalf.

Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!