Hi,
I have dates in a string format as follows:
2012-04-01 21:06:55.8170
I have tried using the following commands to convert the strings into a SIF format
1.- gen double opent=clock(opentime, "YMDhms"), with this command I just generate a new variable with "missing values"
2.- The next thing I tried was adding a # to the mask as follows: gen double opent=clock(opentime, "YMDhms#"). The new variable transforms the original string into a SIF, but as I converted the variable back into a HRF (%tC), I noticed that the milliseconds information was lost.
Any suggestionss as to what i am doing wrong?
Thanx
I have dates in a string format as follows:
2012-04-01 21:06:55.8170
I have tried using the following commands to convert the strings into a SIF format
1.- gen double opent=clock(opentime, "YMDhms"), with this command I just generate a new variable with "missing values"
2.- The next thing I tried was adding a # to the mask as follows: gen double opent=clock(opentime, "YMDhms#"). The new variable transforms the original string into a SIF, but as I converted the variable back into a HRF (%tC), I noticed that the milliseconds information was lost.
Any suggestionss as to what i am doing wrong?
Thanx
Comment