Hi Everyone,
I have a time series data and I want to generate two variables, unable to generate these two variables.
code for the first variable is gen date1=date(start,"DMY")
format date1 %td
code for the first variable is gen double time=clock(start,"DMYhm")
format time %tc
* Example generated by -dataex-. To install: ssc install dataex
clear
input str14 start
"16/06/23 09:54"
"16/06/23 10:07"
"16/06/23 10:11"
"16/06/23 10:15"
"16/06/23 10:20"
"16/06/23 10:25"
"16/06/23 10:30"
"16/06/23 10:34"
"16/06/23 10:40"
"16/06/23 10:47"
"16/06/23 10:52"
"16/06/23 10:55"
"16/06/23 11:11"
"16/06/23 11:17"
"16/06/23 11:22"
"16/06/23 11:29"
"16/06/23 11:34"
"16/06/23 11:38"
"16/06/23 11:39"
"16/06/23 11:52"
"16/06/23 12:01"
"16/06/23 12:07"
"16/06/23 12:18"
"16/06/23 12:20"
"16/06/23 12:27"
"16/06/23 12:43"
"16/06/23 12:49"
"16/06/23 13:00"
"16/06/23 13:03"
"16/06/23 13:17"
"16/06/23 13:19"
"16/06/23 13:22"
"16/06/23 13:24"
"16/06/23 13:26"
"16/06/23 14:01"
"16/06/23 14:16"
"16/06/23 14:22"
"16/06/23 14:25"
"16/06/23 13:46"
"16/06/23 13:50"
"16/06/23 14:27"
"16/06/23 14:30"
"16/06/23 14:32"
"16/06/23 13:59"
"16/06/23 14:34"
"16/06/23 14:08"
"16/06/23 14:10"
"16/06/23 14:42"
"16/06/23 14:45"
"16/06/23 14:51"
"16/06/23 14:49"
"16/06/23 14:53"
"16/06/23 14:50"
"16/06/23 14:59"
"16/06/23 15:05"
"16/06/23 15:07"
"16/06/23 15:12"
"16/06/23 15:15"
"16/06/23 15:07"
"16/06/23 15:11"
"16/06/23 15:19"
"16/06/23 15:25"
"16/06/23 15:30"
"16/06/23 15:33"
"16/06/23 15:34"
"16/06/23 15:54"
"16/06/23 15:36"
"16/06/23 15:57"
"16/06/23 16:01"
"16/06/23 15:41"
"16/06/23 15:45"
"16/06/23 16:04"
"16/06/23 15:47"
"16/06/23 15:52"
"16/06/23 15:55"
"16/06/23 16:07"
"16/06/23 16:08"
"16/06/23 16:10"
"16/06/23 16:11"
"16/06/23 16:12"
"16/06/23 16:13"
"16/06/23 16:14"
"16/06/23 16:31"
"16/06/23 16:20"
"16/06/23 16:21"
"16/06/23 16:50"
"16/06/23 16:26"
"16/06/23 16:30"
"16/06/23 16:54"
"16/06/23 16:32"
"16/06/23 16:57"
"16/06/23 16:59"
"16/06/23 16:33"
"16/06/23 17:02"
"16/06/23 16:35"
"16/06/23 16:37"
"16/06/23 17:07"
"16/06/23 17:28"
"16/06/23 16:39"
"16/06/23 16:41"
end
[/CODE]
Any help is highly appreciated
Ashish
I have a time series data and I want to generate two variables, unable to generate these two variables.
code for the first variable is gen date1=date(start,"DMY")
format date1 %td
code for the first variable is gen double time=clock(start,"DMYhm")
format time %tc
* Example generated by -dataex-. To install: ssc install dataex
clear
input str14 start
"16/06/23 09:54"
"16/06/23 10:07"
"16/06/23 10:11"
"16/06/23 10:15"
"16/06/23 10:20"
"16/06/23 10:25"
"16/06/23 10:30"
"16/06/23 10:34"
"16/06/23 10:40"
"16/06/23 10:47"
"16/06/23 10:52"
"16/06/23 10:55"
"16/06/23 11:11"
"16/06/23 11:17"
"16/06/23 11:22"
"16/06/23 11:29"
"16/06/23 11:34"
"16/06/23 11:38"
"16/06/23 11:39"
"16/06/23 11:52"
"16/06/23 12:01"
"16/06/23 12:07"
"16/06/23 12:18"
"16/06/23 12:20"
"16/06/23 12:27"
"16/06/23 12:43"
"16/06/23 12:49"
"16/06/23 13:00"
"16/06/23 13:03"
"16/06/23 13:17"
"16/06/23 13:19"
"16/06/23 13:22"
"16/06/23 13:24"
"16/06/23 13:26"
"16/06/23 14:01"
"16/06/23 14:16"
"16/06/23 14:22"
"16/06/23 14:25"
"16/06/23 13:46"
"16/06/23 13:50"
"16/06/23 14:27"
"16/06/23 14:30"
"16/06/23 14:32"
"16/06/23 13:59"
"16/06/23 14:34"
"16/06/23 14:08"
"16/06/23 14:10"
"16/06/23 14:42"
"16/06/23 14:45"
"16/06/23 14:51"
"16/06/23 14:49"
"16/06/23 14:53"
"16/06/23 14:50"
"16/06/23 14:59"
"16/06/23 15:05"
"16/06/23 15:07"
"16/06/23 15:12"
"16/06/23 15:15"
"16/06/23 15:07"
"16/06/23 15:11"
"16/06/23 15:19"
"16/06/23 15:25"
"16/06/23 15:30"
"16/06/23 15:33"
"16/06/23 15:34"
"16/06/23 15:54"
"16/06/23 15:36"
"16/06/23 15:57"
"16/06/23 16:01"
"16/06/23 15:41"
"16/06/23 15:45"
"16/06/23 16:04"
"16/06/23 15:47"
"16/06/23 15:52"
"16/06/23 15:55"
"16/06/23 16:07"
"16/06/23 16:08"
"16/06/23 16:10"
"16/06/23 16:11"
"16/06/23 16:12"
"16/06/23 16:13"
"16/06/23 16:14"
"16/06/23 16:31"
"16/06/23 16:20"
"16/06/23 16:21"
"16/06/23 16:50"
"16/06/23 16:26"
"16/06/23 16:30"
"16/06/23 16:54"
"16/06/23 16:32"
"16/06/23 16:57"
"16/06/23 16:59"
"16/06/23 16:33"
"16/06/23 17:02"
"16/06/23 16:35"
"16/06/23 16:37"
"16/06/23 17:07"
"16/06/23 17:28"
"16/06/23 16:39"
"16/06/23 16:41"
end
[/CODE]
Any help is highly appreciated
Ashish
Comment