cyberchief Posted March 22, 2006 Report Share Posted March 22, 2006 Ok... kind of confusing... I have 2 Text Variables that are as such: T1 = 2/15/06 T2 = 3/23/06 What I want to do is... subtract T1 from T2 to get the amount of days between the two dates. Since these are text string variables... I cannot do math functions. I know the PGM functions can probably do this... but I need to try and find a way to do this without PGM for now. Any ideas? Quote Link to comment Share on other sites More sharing options...
kevin Posted March 22, 2006 Report Share Posted March 22, 2006 You will need to parse each date into individual parts and convert each part into integer variables. Then you can write the math to calculate the days. You may be able to adapt one of the Shared Macros that deal with date math: Date Time or Date Time Difference Calculator. Quote Link to comment Share on other sites More sharing options...
Dash Posted March 22, 2006 Report Share Posted March 22, 2006 It looks like this one is almost exactly what you need: http://www.macros.com/usermacs/umdatetimedifferences.htm Quote Link to comment Share on other sites More sharing options...
cyberchief Posted March 22, 2006 Author Report Share Posted March 22, 2006 Thanks All. I did get it figured out. I used some ideas from PGM Library (ok... copied a small portion of the code)... and some of my own ingenuity... Works like a charm. I would post it here... but feel that I would betray PGM to do so... Quote Link to comment Share on other sites More sharing options...
paul Posted March 22, 2006 Report Share Posted March 22, 2006 I used some ideas from PGM Library (ok... copied a small portion of the code) That's exactly what the source code version is for - we're glad it was of use to you. I would post it here... but feel that I would betray PGM to do so... Quite right! Quote Link to comment Share on other sites More sharing options...
cyberchief Posted March 23, 2006 Author Report Share Posted March 23, 2006 I would post it here... but feel that I would betray PGM to do so..Quite right! In David, we Trust! Unlike Dash in another post recently... I find hte open source of PGM to be an invaluable tool! This is the first instance where I have had to actually copy a small portion of code... But I will say that being able to read the PGM macros has helped me tremendously! If nothing else... I can see how others write macros and it gives me great ideas for my own. So, I hereby declare... I, david, being of sound mind and of no affiliation with PGM Macros, announce that PGM Libraries are the greatest thing next to sliced bread and budwieser. Quote Link to comment Share on other sites More sharing options...
paul Posted March 23, 2006 Report Share Posted March 23, 2006 So, I hereby declare... I, david, being of sound mind and of no affiliation with PGM Macros, announce that PGM Libraries are the greatest thing next to sliced bread and budwieser. Your cheque is in the post <g>! 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.