Hi
I've been trying to automate few processes using SPSS /Python. I have build few buttons for Month and Year using Custom Dialog Box where I would like to get input from user for month [Jan - Dec] and year [2011, 2012, 2013 onwards]. Few things are bothering as I couldn't figure out how the triggered values from List item would be used to add month and year in a target list to run a query for user selected Month and Year. Infact to replace date in code everytime it is selected by the user. Below is a syntax where I would like to plug in the value replacing the static date below. compute start = date.dmy(01,04,11). compute end = date.dmy(30,09,11). EXECUTE. Examples would be appreciated!! Regards Albert ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Let's say that your dialog box has numeric
edit controls named startmonth, endmonth, startyear and endyear.
Then in the dialog box syntax you would just write compute start = date.dmy(01,%%startmonth%%,%%startyear%%). compute end = date.dmy(30,%%endmonth%%,%%endyear%%). You can put range constraints on these controls, but you can't force the starting date to be less than or equal to the ending date. Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] new phone: 720-342-5621 From: Albert Gill <[hidden email]> To: [hidden email] Date: 12/28/2011 10:38 AM Subject: [SPSSX-L] SPSS Custom dialog box /Replacing static date Sent by: "SPSSX(r) Discussion" <[hidden email]> Hi I've been trying to automate few processes using SPSS /Python. I have build few buttons for Month and Year using Custom Dialog Box where I would like to get input from user for month [Jan - Dec] and year [2011, 2012, 2013 onwards]. Few things are bothering as I couldn't figure out how the triggered values from List item would be used to add month and year in a target list to run a query for user selected Month and Year. Infact to replace date in code everytime it is selected by the user. Below is a syntax where I would like to plug in the value replacing the static date below. compute start = date.dmy(01,04,11). compute end = date.dmy(30,09,11). EXECUTE. Examples would be appreciated!! Regards Albert ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Free forum by Nabble | Edit this page |