On Thu, 11 Feb 2021 21:35:26 -0800 (PST), Erin Holloway
Post by Erin Holloway
Essentially the plan is to count the dates by counting the number of deliniators (~) and then add one.
I have tried this, which runs, but every case is '0'
Searching a single string variables would be a clever extenstion
of the COUNT command, but that is not how COUNT works. It
wants a set of variables, to compare to a value.
The way to search a string in SPSS syntax is to use char.index
and to find the matches one at a time, re-starting the search
after each match.
I suspect that counting matches in a string is available in the
Python extensions, which I don't know much about. For your
data, it probably can break out the dates, giving you a set of
new variables and a count of how many.
[cribbed from an older message by Bruce]
The SPSS mailing list (http://spssx-discussion.1045642.n5.nabble.com/)
is a lot more active than this forum these days. You might want to
join that list (if not already a member) and post your question there.
Via the page given above, click on -more options- near the top for
info on how to subscribe. HTH.