Hello,
I appreciate if you could help me on formatting 1-minute data.
I have datetime variable as “2005-01-01T00:00:00.000000000Z”. As a first step I run the following commands

gen str date = substr(datetime, 1, 10)
gen hour = real(substr(datetime,12,2))
gen min = real(substr(datetime,15,2))
gen year= real(substr(datetime,1,4))
gen month= real(substr(datetime,6,2))
gen day= real(substr(datetime,9,2))
gen mdy=mdy(month,day,year)
format mdy %td
gen mytime=Cmdyhms(month,day,year,hour,min,0)
format mytime %tc

However, when I tsset my dataset by “mytime”, I got the error as “repeated time values in sample”. I couldn’t figure out the accurate format for seconds I guess.

Pinar