stuff03 Posted January 18, 2008 Share Posted January 18, 2008 I need to run a script that automatically finds all records with a date that is within 35 days from the current date... Is it possible? Thanks Quote Link to comment Share on other sites More sharing options...
stuff03 Posted January 18, 2008 Author Share Posted January 18, 2008 figured it out.... Date ( Month ( Get(CurrentDate) ) ; Day ( Get(CurrentDate) ) ; Year ( Get(CurrentDate) ) )+35 will show the date 35 days from todays date Quote Link to comment Share on other sites More sharing options...
Jack Rodgers Posted January 18, 2008 Share Posted January 18, 2008 Get ( currentdate ) + 35 is shorter. Within may cover the range -35 to + 35. Is this so? Quote Link to comment Share on other sites More sharing options...
stuff03 Posted January 19, 2008 Author Share Posted January 19, 2008 i thought i tried that, maybe not, oh well it works as it should. Thanks. Quote Link to comment Share on other sites More sharing options...
baseheadbob Posted January 22, 2008 Share Posted January 22, 2008 figured it out.... Date ( Month ( Get(CurrentDate) ) ; Day ( Get(CurrentDate) ) ; Year ( Get(CurrentDate) ) )+35 will show the date 35 days from todays date Get ( currentdate ) + 35 is shorter. Within may cover the range -35 to + 35. Is this so? Hmm... the shorter one is nice, but the longer one solves my dilemma of finding upcoming birthdays! Sweeeet! Quote Link to comment Share on other sites More sharing options...
Jack Rodgers Posted January 22, 2008 Share Posted January 22, 2008 Hmm... the shorter one is nice, but the longer one solves my dilemma of finding upcoming birthdays! Sweeeet! If you think about it, all that computing power only breaks get (currentdate) into its component day, month and year and then puts them back together using dat() to produce exactly what you started with get(currentdate)... smiley-undecided Date ( Month ( Get(CurrentDate) ) ; Day ( Get(CurrentDate) ) ; Year ( Get(CurrentDate) ) ) = get (currentdate) get(it)? Date ( Month ( Get(CurrentDate) ) ; Day ( Get(CurrentDate) ) + 35 ; Year ( Get(CurrentDate) ) ) might just sneak through the logic filter but Get (currentdate ) + 35 is so much simpler... However, it is your database. Date ( Month() + X ; date() ; Year () ) adds months to the date Date ( Month() ; date() ; Year () + X ) adds years to the date Quote Link to comment Share on other sites More sharing options...
jmille44@mac.com Posted September 9, 2008 Share Posted September 9, 2008 I am trying to do the same thing. I have renewal dates for customers that I just want to show renewal dates from the coming 3 months or 90 days whatever is easier. I have customer field, renewal date field. How would I implement your solution in a script for a button? Thanks so much for the help. Quote Link to comment Share on other sites More sharing options...
stuff03 Posted September 9, 2008 Author Share Posted September 9, 2008 you should be able to use the same... or similar solution to what is above. I would think that going 90 days would be easier than 3 months. will you be searching 90 days out from today's date? or would you put in a given date and then have it search 90 days out from that date? Quote Link to comment Share on other sites More sharing options...
jmille44@mac.com Posted September 9, 2008 Share Posted September 9, 2008 I would be searching 90 days out from today's date. Thing is, from the solution above, I don't understand how to implement it. Would I do an omit records, or do a script and what would the script steps look like? Thanks so much, I am just not grasping this yet. Quote Link to comment Share on other sites More sharing options...
stuff03 Posted September 9, 2008 Author Share Posted September 9, 2008 it would go something like this Set Variable [ $date; Value:Get(CurrentDate)&"..."&Get(CurrentDate)+90 ] Enter Find Mode [ ] Set Field [ Home Page::Container; $date ] Perform Find [ ] obviously this would be a little different for how yours is set up, but that variable will give you from todays date to the date 90 days from now. Quote Link to comment Share on other sites More sharing options...
jmille44@mac.com Posted September 9, 2008 Share Posted September 9, 2008 Your awesome! Worked perfect. Thank you! Quote Link to comment Share on other sites More sharing options...
stuff03 Posted September 9, 2008 Author Share Posted September 9, 2008 No problem... hey wait a second... thats the first time I actually helped someone else! sweet Quote Link to comment Share on other sites More sharing options...
davidwarren Posted October 1, 2008 Share Posted October 1, 2008 I can't seem to get this to work for me, I am trying to find records that need to be printed and are older than 30 days and not already printed (auto generated print date field will be blank). Anyone willing to give me some advice? 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.