Ryan Posted June 14, 2022 Report Share Posted June 14, 2022 I have a repeating macro that I need some help with; time/date is my kryptonite. 1. Need to be able to start with a specific date in the past in MMDDYYYY format; I think I have this part...but probably not I think I'm close under set "Specific Date?Time "Specific Date" and set format and "type out." That part I can get. 2. Upon repeat, I need it to increment the specific date +1. I see the tools in there that adjust the day from the current date, but I can't seem to modify from the original set date. I'm pulling my hair out...please help. The rest of the macro is flawless... just need to change the date one day at a time. Quote Link to comment Share on other sites More sharing options...
rberq Posted June 15, 2022 Report Share Posted June 15, 2022 Look at these commands, and refer to the Help pages. Quote Link to comment Share on other sites More sharing options...
rberq Posted June 15, 2022 Report Share Posted June 15, 2022 Date/Time: Set %dattim% to "12/28/2021 10:55:50 PM" Variable Modify Date/Time: Convert to Text String Text Box Display: dt Repeat Start (Repeat 10 times) Variable Modify Date/Time: %dattim% = %dattim% + 1 Days Variable Modify Date/Time: Convert to Text String Text Box Display: dt End Repeat Macro Return <DATE/TIME Flags="\xB1" Date="12/28/2021 10:55:50 PM" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%dattim%" IsDateVar="TRUE"/> <VARIABLE MODIFY DATE/TIME DateVar="%dattim%" Option="\x09" LeftVar="mm'-'dd'-'yyyy" RightVal="%dattimtext%" UseInteger="FALSE" MathOpt="\x00"/> <TEXT BOX DISPLAY Title="dt" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 date = %dattim%\r\n\\par %dattimtext%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <REPEAT START Start="1" Step="1" Count="10" Save="FALSE"/> <VARIABLE MODIFY DATE/TIME DateVar="%dattim%" Option="\x00" LeftVar="%dattim%" RightVal="1" UseInteger="FALSE" MathOpt="\x00"/> <VARIABLE MODIFY DATE/TIME DateVar="%dattim%" Option="\x09" LeftVar="mm'-'dd'-'yyyy" RightVal="%dattimtext%" UseInteger="FALSE" MathOpt="\x00"/> <TEXT BOX DISPLAY Title="dt" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 date = %dattim%\r\n\\par %dattimtext%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <END REPEAT/> <MACRO RETURN/> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.