cyberchief Posted May 31, 2005 Report Share Posted May 31, 2005 To install PGM Functions Library, the user will need administrative privileges to install the applications. I know that some (most?) of the functions in the library write and read to the registry. Would running these macros require administrative privileges as well (since it will be accessing the registry)? Quote Link to comment Share on other sites More sharing options...
joe Posted May 31, 2005 Report Share Posted May 31, 2005 Hello cyberchief! Like most software, the PGM Functions Library requires administrative privileges to install because of the need to write information to the HKLM (HKEY_LOCAL_MACHINE) area of the Registry. It is also true that the registration process also requires writing to the HKLM Registry area. However, the functions themselves do not. They read and write only to the HKCU (HKEY_CURRENT_USER) area in which you, as the user, can do without needing special permissions. All of the reading and writing takes place within the HKCU\Software\Professional Grade Macros key. Quote Link to comment Share on other sites More sharing options...
cyberchief Posted May 31, 2005 Author Report Share Posted May 31, 2005 Thanks Joe! That's what I needed to know! Quote Link to comment Share on other sites More sharing options...
cyberchief Posted May 31, 2005 Author Report Share Posted May 31, 2005 One more question on the PGM Functions... in the Date functions.. is there a way to convert the "Formated Date String" to just a "Date"? i.e. convert 20050531 to 05/31/2005? I see there is a function to do this the other way around... but I am not seeing one for this example. Quote Link to comment Share on other sites More sharing options...
randallc Posted May 31, 2005 Report Share Posted May 31, 2005 Hi, I am not expert on PGM, and have not tested that; I think in the previous macros it would have worked using {Date Julian} with the "20050531" and then {Julian to Date} with your format; ie I think 2 commands. Best, Randall EDIT -see below; not so! Quote Link to comment Share on other sites More sharing options...
cyberchief Posted May 31, 2005 Author Report Share Posted May 31, 2005 From what I am reading in the PGM Manual... Julian to date would produce 20050531. I am looking to reformat that to 05/31/2005. Thanks though. Quote Link to comment Share on other sites More sharing options...
randallc Posted June 1, 2005 Report Share Posted June 1, 2005 EDIT - I think you are right. It looks fiddly; perhaps, as in the source for {Go Days} Variable Modify String: Copy Part of %T2% to %T11% Variable Modify String: Copy Part of %T2% to %T12% Variable Modify String: Copy Part of %T2% to %T13% Replace "%T2%" with "%T12%/%T13%/%T11%" in %T2% Alternatively, there seems to be a { DateTime - Parse Day from Julian },{ DateTime - Parse Month from Julian },{ DateTime - Parse Year from Julian } etc set of functions to call?; so you don't need to call the { DateTime - Julian to Date }? I'll await Joe's answer with interest Quote Link to comment Share on other sites More sharing options...
joe Posted June 1, 2005 Report Share Posted June 1, 2005 Hello cyberchief and Randall! There is no function to convert the formatted date string "20050531" to "05/31/2005" or any other pattern. I would suggest using something similar to the code Randall found in the {DateTime - Format Input String} function or you can use the Run Macro in Variable command to format the string to any other pattern, say "May-31-2005": Variable Set String %T1% "20050531" Variable Modify String: Copy Part of %T1% to %T3% Variable Modify String: Copy Part of %T1% to %T2% Variable Modify String: Copy Part of %T1% to %T1% Variable Set String %T1% "<DT:mmm-dd-yyyyT:01:2:%T1%/%T2%/%T3%12:00:00 AM>" Run Macro in Variable %T1% <TVAR2:01:01:20050531><TMVAR2:10:03:01:001:004:><TMVAR2:10:02:01:007:002:><TMVAR2:10:01:01:005:002:><TVAR2:01:01:<DT:mmm-dd-yyyyT:01:2:%T1%/%T2%/%T3%12:00:00 AM>><RUNMACVAR:1> The Run Macro in Variable command is running a dynamic Macro Express Text Date/Time command. Quote Link to comment Share on other sites More sharing options...
joe Posted June 1, 2005 Report Share Posted June 1, 2005 there seems to be a { DateTime - Parse Day from Julian },{ DateTime - Parse Month from Julian },{ DateTime - Parse Year from Julian } etc set of functions to call?; so you don't need to call the { DateTime - Julian to Date }? The parsing functions use the {DateTime - Julian to Date} function to convert the passed Julian Day number and then parses out the string from the result. Quote Link to comment Share on other sites More sharing options...
cyberchief Posted June 1, 2005 Author Report Share Posted June 1, 2005 I think for my application I can use the "modify string" as you do below... but I don't think I will need to use the "Run macro in variable". I am using this in conjunction with the macro that Floyd provided (for PGM libraries) to dump out 1 particular date using the 2 account bill dates). I have set it up to read off 2 dates on a spreadsheet and will have it dump out the next availabe due date. Right now, it will dump out the 20050601 date... I can use modify string and put the YYYY, MM and DD into seperate variables and use text type %T2%/%T1%/%T3% into the spreadsheet. This should work just fine. Since there are functions to convert dates in all ways but this... I thought it might be possible. I guess it is something to suggest in the other forum. Thanks Joe and 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.