Hi everyone,
I have a very easy question for stata specialists. I have some of my date's hours that are not in the "format" that I want
* Example generated by -dataex-. For more info, type help dataex
clear
input double(date_hour price)
1.9407168e+12 91.99
1940720399999.9998 91.26
1940723999999.9995 91.65
1.9407276e+12 91.99
1940731199999.9998 91.99
end
format %tc date_hour
[/CODE]
For example, the value above in red is written as 01jul2021 00:59:59, instead of 01:00:00.
Basically, my hours should be instead 00:00:00, 01:00:00, 02:00:00, and so on.
Could anyone please give me the solution to that?
Thanks.
Michael
I have a very easy question for stata specialists. I have some of my date's hours that are not in the "format" that I want
* Example generated by -dataex-. For more info, type help dataex
clear
input double(date_hour price)
1.9407168e+12 91.99
1940720399999.9998 91.26
1940723999999.9995 91.65
1.9407276e+12 91.99
1940731199999.9998 91.99
end
format %tc date_hour
[/CODE]
For example, the value above in red is written as 01jul2021 00:59:59, instead of 01:00:00.
Basically, my hours should be instead 00:00:00, 01:00:00, 02:00:00, and so on.
Could anyone please give me the solution to that?
Thanks.
Michael
Comment