Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: date to date range value (SPSS)

216 views
Skip to first unread message

Art Kendall

unread,
Oct 21, 2012, 11:22:34 AM10/21/12
to
It looks like you might be looking at creating sequential US government
fiscal years.
see if this example syntax does what you want.
new file.
input program.
loop #i = 1 to 1000.
compute mydate = rv.uni(date.dmy(10,1,2008),date.dmy(1,1,2013)).
end case.
end loop.
end file.
end input program.
sort cases by mydate.
formats mydate (adate10).
COMPUTE cal_quarter=XDATE.QUARTER(mydate).
COMPUTE cal_year=XDATE.YEAR(mydate).
FORMATS cal_quarter(f1)cal_year(F4).
numeric fiscal_year (f4).
VARIABLE LABELS
cal_quarter "calendar year quarter"
cal_year "calendar year of the date"
fiscal_year "US Federal fiscal year of the date" .
do if cal_quarter le 3.
compute fiscal_year = cal_year.
else if cal_quarter eq 4.
compute fiscal_year = cal_year + 1.
ELSE.
print / " :( should not be here" $casenum mydate cal_quarter
cal_year fiscal_year
/.
end if.
numeric sequential_fy (f2).
compute sequential_fy = fiscal_year-2007.
list variables= all /cases= by 50.






Art Kendall
Social Research Consultants

On 10/18/2012 3:51 PM, Sarah Samblanet wrote:
>
> I need to convert each of these dates into a value that corresponds to a range of dates:
>
> 1 = October 1, 2008 to September 30, 2008
> 2 = October 1, 2009 to September 30, 2010
> 3 = October 2, 2010 to September 30, 2011
> 4 = October 1, 2011 to September 30, 2012
>
> I am wondering how to do this with syntax in SPSS (and just for my own information, what the corresponding way to do it via dialog boxes/drop-down menus would be).
>

rohin...@gmail.com

unread,
Apr 26, 2013, 3:05:59 PM4/26/13
to
Hello,
Please contact if any are interested to take up the following Job.

Technical Lead – Worked on SPSS
Contract to hire Position
Location: California

Need an experienced Technical Lead (Solution Design, leadership) that has deep experience with the IBM survey and market research platform - SPSS Data Collection. Skills may also be referenced by the original product that IBM acquired - SPSS Dimensions. This individual must be able to help define and enforce market research survey programming and data processing technical standards. Ability to leverage automation tools within the platform is also required. Lastly, this individual would be a mentor to other Developers that are still growing their platform knowledge.

Complete details of this job can be discussed on this # 972-525-7002 Ext: 109

It would be really great if you can refer someone who would be interested for this position. Thanks!
0 new messages