STATA每次打开自动记录单独的日志,不覆盖,便于分析错误原因
STATA每次打开自动记录单独的日志,不覆盖,便于分析错误原因 //将当前相关代码复制到stata安装目录下的profile.do文件中 //每次打开stata自动保存日志不丢失,不覆盖,以打开stata时日期时间为日志文件名,便于分析错误找原因 local wjm=subinstr(subinstr("`c(current_date)'",":","",.)," ","",.) local year=year(date("`wjm'","DMY")) local month= month(date("`wjm'","DMY")) local day= day(date("`wjm'","DMY")) local sj=subinstr(subinstr("`c(current_time)'",":","",.)," ","",.) local wjma="`year'`month'`day'`sj'" log using "`wjma'",text