Jump to content
Macro Express Forums

Take A Date And Advance It By 2 Days, Possible?


andsoitgoes

Recommended Posts

Use the Date/Time command. The command allows you to specify a number of days into the past or future. You can also choose the format that the date will be created in.
Date/Time: Save "dddd, MMMM dd, yyyy" into %T1%

Kevin - thanks SO much, but what would I use to "advance" the date?

 

So this code:

 

Date/Time: Save "dddd, MMMM dd, yyyy" into %T1%

 

Where would I put the advance variable?

 

Maybe if I give the context of how I'm using it, it will help.

 

I want to put in:

 

-----

*Today's Date* - My Name: I want to do such and such on *Two Days from Today's Date*

-----

 

So it needs to be dynamic and based off the current system date

 

Thanks again!

 

Nick

Link to comment
Share on other sites

Hi,

It doesn't show in the code;

Date/Time: Save "dddd, d MMMM yyyy" into %T1%

Date/Time: Save "dddd, d MMMM yyyy" into %T2%

Text Box Display: Text with Dates

but does in the true code (copy this into your script and run it)

<DT:dddd, d MMMM yyyyT:01:1:><DT:dddd, d MMMM yyyyT:02:3:{F00002}{P00000}{P00000}{P00000}><TBOX4:T:1:000198000093000624000361:000:Text with Dates%T1%: Myname:

I want to do such and such on %T2%>

Best, Randall

Link to comment
Share on other sites

Hi,

Afraid not; see other post!

Advance weekdays

// First time, use today's DAY of Week to calculate No of weekdays to advance

Variable Set Integer %N1% to 2

Date/Time: Save "ddd" into %T1%

If Variable %T1% = "Thu"

  OR

If Variable %T1% = "Fri"

  Variable Modify Integer: %N1% = %N1% + 2

End If

If Variable %T1% = "Sat"

  Variable Modify Integer: %N1% = %N1% + 1

End If

// Do exactly the same as before , but use %N1% to advance date instead of "2"

<REM2:First time, use today's day to calculate No of weekdays to advance><IVAR2:01:01:2><DT:dddT:01:3:{F00000}{P00000}{P00000}{P00000}><IFVAR2:1:01:1:TThu><OR><IFVAR2:1:01:1:TFri><NMVAR:01:01:1:0000001:2:0000002><ENDIF><IFVAR2:1:01:1:TSat><NMVAR:01:01:1:0000001:2:0000001><ENDIF><REM2:Do exactly the same as before , but use %N1% to advance date instead of "2"><DT:dddd, d MMMM yyyyT:01:3:{F00000}{P00000}{P00000}{P00000}><DT:dddd, d MMMM yyyyT:02:3:{F0%N1%}{P00000}{P00000}{P00000}><TBOX4:T:1:000198000303000624000151:000:Text with Dates%T1%: Myname:
I want to do such and such 2 weekdyas ahead on %T2%>

Best, Randall

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...