Dear Statalist community,
I have a question on date variables and couldn't find a solution in the help dates file. I have a dataset that looks as follows:
However, I am only interested in the time of the year, not the year itself. Thus, I would like to convert dd-mm-yyyy to dd-mm to get a dataset that looks like the following and does not contain the information about the year anymore:
Is that possible? Thank you for your help!
Best,
Nora
I have a question on date variables and couldn't find a solution in the help dates file. I have a dataset that looks as follows:
Code:
l lat lon id start end in 1/21, sep(7) +-----------------------------------------------------+ | lat lon id start end | |-----------------------------------------------------| 1. | -34.463232 19.542468 1 01jul1982 01jan1983 | 2. | -34.463232 19.542468 1 15jul1983 01nov1983 | 3. | -34.463232 19.542468 1 15jun1984 01nov1984 | 4. | -34.463232 19.542468 1 15feb1985 01nov1985 | 5. | -34.463232 19.542468 1 01jul1986 01dec1986 | 6. | -34.463232 19.542468 1 15jun1987 15nov1987 | 7. | -34.463232 19.542468 1 01jul1988 01nov1988 | +-----------------------------------------------------+ end
Code:
l lat lon id start end in 1/7, sep(7) +-----------------------------------------------------+ | lat lon id start end | |-----------------------------------------------------| 1. | -34.463232 19.542468 1 01jul 01jan | 2. | -34.463232 19.542468 1 15jul 01nov | 3. | -34.463232 19.542468 1 15jun 01nov | 4. | -34.463232 19.542468 1 15feb 01nov | 5. | -34.463232 19.542468 1 01jul 01dec | 6. | -34.463232 19.542468 1 15jun 15nov | 7. | -34.463232 19.542468 1 01jul 01nov | +-----------------------------------------------------+ end
Best,
Nora
Comment