Hi all,

I would like to write a command to stsplit a dataset thus:

Code:
stsplit newvar, at(datelist)
instead of

Code:
stsplit newvar, at(numlist)
The reason is that I have a large number of dates to stsplit on, and it is an extra step to convert dates into a number before typing them into code. The following does not work, unfortunately

Code:
stsplit newvar, at(d(31Jan2017))
Is there a workaround that I can use? Alternatively, is there a quick way I can calculate the number represented by a date to help my efficiency?

Thanks

MM