全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2369 5
2011-01-11
问题如题,查了时间函数,没有找到调用当前系统时间的函数,请各位前辈们帮忙。先谢谢。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2011-1-11 11:53:00
1# jzhyue
Try to use the global macros where the system date and time are stored.
http://www.stata.com/support/faqs/data/dateandtime.html

例子:

. display "$S_DATE"
11 Jan 2011

.
. display "$S_TIME"
11:52:43

.
. display "$S_TIME  $S_DATE"
11:52:43  11 Jan 2011
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-1-11 12:12:49
2# houquan 谢谢您!
原来 global macros也有这样的功能。
thanks
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-1-14 08:19:38
. 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
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-1-14 20:34:18
dxystata 发表于 2011-1-14 08:19
. 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
谢谢dxystata版主!
c() class也是不错的选择。
thanks
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-3-9 16:50:12
我试了好几次,不知道什么格式的,没法完成赋值,主要是我想把这个作为seed,产生随机数
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群