12-09-2017 12:24 AM
I want to prepare dataset which has values for every 6 hours.
input loop dsstartdate ;
format dsstartdate datetime25.6;
so my data looks like this
And this is how I want
So Basically A loop through all the dates by every 6 hours. I was using intnx in a do loop
However somehow cant be able to crack it.
Anyhelp is appreaciated
12-09-2017 02:25 AM
Thanks for the clue. Worked like a charm. Just in case if anyone needs the code.
input dsstartdate dsenddate;
format dsstartdate dsenddate datetime25.6;
do dt = DSSTARTDATE to DSENDDATE by '06:00:00't;
if timepart(dt)=0 then
if timepart(dt)=21600 then
if timepart(dt)=43200 then
if timepart(dt)=64800 then
format dt datetime25.6;
keep dt counter;
Need further help from the community? Please ask a new question.