How can i format a date like this "Wed Feb 20 12:29:11 UTC 2013" so that it can be in the correct date format like "YMDhm". The variable is currenntly str28 and format %28s
-
Login or Register
- Log in with
. clear . set obs 1 number of observations (_N) was 0, now 1 . gen mystr = "Wed Feb 20 12:29:11 UTC 2013" . ssc inst numdate . help numdate . numdate clock mytime = mystr, pattern("# M D hms # Y") . l +---------------------------------------------------+ | mystr mytime | |---------------------------------------------------| 1. | Wed Feb 20 12:29:11 UTC 2013 20feb2013 12:29:11 | +---------------------------------------------------+
Comment