Dear All


How can we extract year, month and day from a varibale. Please find attached the example of my data set.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str19 q1_10
"2019-01-22T01:44:30"
"2019-01-22T02:11:23"
"2019-01-22T03:53:45"
"2019-01-30T00:56:41"
"2019-01-24T21:34:13"
"2019-01-24T04:26:32"
"2019-01-24T03:59:41"
"##N/A##"            
"##N/A##"            
"2019-01-22T02:54:16"
"2019-01-29T04:21:59"
"2019-01-23T23:48:14"
"2019-01-25T05:54:02"
"2019-01-30T00:38:49"
"2019-01-23T23:10:38"
"2019-01-30T01:50:00"
"2019-01-24T00:19:35"
"2019-01-23T23:21:34"
"2019-01-25T01:14:56"
"2019-01-24T23:50:47"
"2019-01-25T02:02:54"
"2019-01-25T01:51:20"
"2019-01-24T23:48:08"
"2019-01-25T01:39:17"
"2019-01-25T01:25:59"
"2019-01-25T01:55:45"
"2019-01-28T03:03:36"
"2019-01-28T03:11:30"
"2019-01-28T02:53:54"
"2019-01-25T01:51:51"
"2019-01-25T01:43:07"
"2019-01-25T02:08:59"
"2019-01-27T03:13:12"
"2019-01-28T00:58:14"
"2019-01-25T01:24:27"
"2019-01-27T03:18:11"
"2019-01-28T02:31:49"
"2019-01-24T23:34:24"
"2019-01-28T02:39:54"
"2019-01-29T22:12:08"
"2019-01-29T03:10:17"
"2019-01-29T02:14:56"
"2019-01-29T02:18:07"
"2019-01-29T03:20:26"
"2019-01-29T02:55:00"
"2019-01-29T02:12:11"
"2019-01-29T01:56:13"
"2019-01-29T02:42:55"
"2019-01-29T02:27:33"
end