|
1.通过宏获取当前系统时间
- . display "$S_DATE"
- 14 Feb 2003
- . display "$S_TIME"
- 15:53:01
- . display "$S_TIME $S_DATE"
- 15:53:17 14 Feb 2003
复制代码
2.通过返回值获取当前系统时间
- . display c(current_date)
- 14 Feb 2003
- . display c(current_time)
- 15:56:05
- . display "`c(current_time)' `c(current_date)'"
- 15:56:32 14 Feb 2003
复制代码
来源:stata |
|