andsoitgoes Posted April 26, 2005 Report Share Posted April 26, 2005 Hi all - I was just wondering if it is possible to enter the date, and advance that by 2 days? I couldn't find anything, and I'm nowhere near proficent enough to be able to figure it out on my own Thanks much! Nick Quote Link to comment Share on other sites More sharing options...
cyberchief Posted April 26, 2005 Report Share Posted April 26, 2005 Welcome andsoitgoes, Do you mean to set the date 2 days forward of todays date? Or 2 days forward of an entered (user prompted) date? Quote Link to comment Share on other sites More sharing options...
andsoitgoes Posted April 26, 2005 Author Report Share Posted April 26, 2005 Oh, thanks! Yes, setting it 2 days forward of the current date, nothing user entered. Thanks for the super fast reply!! Nick Quote Link to comment Share on other sites More sharing options...
kevin Posted April 26, 2005 Report Share Posted April 26, 2005 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% Quote Link to comment Share on other sites More sharing options...
andsoitgoes Posted April 26, 2005 Author Report Share Posted April 26, 2005 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 Quote Link to comment Share on other sites More sharing options...
randallc Posted April 27, 2005 Report Share Posted April 27, 2005 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 Quote Link to comment Share on other sites More sharing options...
andsoitgoes Posted April 27, 2005 Author Report Share Posted April 27, 2005 AWESOME! That's so easy! I just looked at the code and am kicking myself!! Now, one last little tweak - any way this can ONLY count Weekdays? Thanks again! Nick Quote Link to comment Share on other sites More sharing options...
randallc Posted April 27, 2005 Report Share Posted April 27, 2005 Hi, Afraid not; see other post! Advance weekdays // First time, use today's DAY of Week to calculate No of weekdays to advanceVariable 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 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.