Jump to content
Macro Express Forums

know which is the last day of the month


cesaros

Recommended Posts

To determine whether today is the last day of the month, you need a macro something like this (in pseudo-code):

 

// %T1% is today's month in <num><num> format, e.g., February = 02

// %T2% is the number of days in the month

 

Today's month = %T1%

 

// If January, March, May, etc.

If %T1% = "01" OR %T1% = "03" %T1% = "05" etc.

%T2% = "31"

 

// If April, June, etc.

If %T1% = "04" OR %T1% = "06" etc.

%T2% = "30"

 

// Else it's February. (Need a special case for leap years)

Else

%T2% = "28"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...