楼主: shevaze
4182 3

[编程问题求助] stata怎么生成当天的日期? [推广有奖]

  • 2关注
  • 10粉丝

已卖:87份资源

副教授

75%

还不是VIP/贵宾

-

威望
0
论坛币
2962 个
通用积分
44.3410
学术水平
9 点
热心指数
5 点
信用等级
3 点
经验
87190 点
帖子
718
精华
0
在线时间
1095 小时
注册时间
2010-11-13
最后登录
2024-5-15

楼主
shevaze 发表于 2013-6-13 16:09:08 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
如题,谢谢!
二维码

扫码加我 拉你入群

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

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

关键词:Stata tata

沙发
shevaze 发表于 2013-6-13 23:31:37
再顶。。。

藤椅
蓝色 发表于 2013-6-14 00:16:12
Title

    [P] creturn -- Return c-class values


Syntax

        creturn list


Menu

    Data > Other utilities > List constants and system parameters


Description

    Stata's c-class, c(), contains the values of system parameters and settings, along with certain constants such as
    the value of pi.  c() values may be referred to but may not be assigned.


Remarks

        System values
        Directories and paths
        System limits
        Numerical and string limits
        Current dataset
        Memory settings
        Output settings
        Interface settings
        Graphics settings
        Efficiency settings
        Network settings
        Update settings
        Trace (program debugging) settings
        Mata settings
        Other settings
        Other


System values

    c(current_date) returns the current date as a string in the format "dd Mon yyyy", where dd is the day of the month
        (if day is less than 10, a space and one digit are used); Mon is one of Jan, Feb, Mar, Apr, May, Jun, Jul, Aug,
        Sep, Oct, Nov, or Dec; and yyyy is the four-digit year.

        Examples:
            1 Jan 2003
            26 Mar 2007
            13 Jun 2013

    c(current_time) returns the current time as a string in the format "hh:mm:ss", where hh is the hour 00 through 23,
        mm is the minute 00 through 59, and ss is the second 00 through 59.

        Examples:
            09:42:55
            13:02:01
            09:05:45

    c(rmsg_time) returns a numeric scalar equal to the elapsed time last reported as a result of set rmsg on; see [P]
        rmsg.

    c(stata_version) returns a numeric scalar equal to the version of Stata that you are running.  In Stata 12.1, this
        number is 12.1; in Stata 12.1.1, 12.1.1; and in Stata 13, 13.  This is the version of Stata that you are
        running, not the version being mimicked by the version command.

    c(version) returns a numeric scalar equal to the version currently set by the version command; see [P] version.

    c(born_date) returns a string in the same format as c(current_date) containing the date of the Stata executable you
        are running; see [R] update.

    c(flavor) returns a string containing "Small" or "IC" according to the version of Stata that you are running.
        c(flavor)="IC" for Stata/MP and Stata/SE, as well as for Stata/IC.

    c(bit) returns a numeric scalar equal to 64 if you are using a 64-bit version of Stata and 32 if you are using a
        32-bit version of Stata.

    c(SE) returns a numeric scalar equal to 1 if you are running Stata/SE and 0 otherwise.

    c(MP) returns a numeric scalar equal to 1 if you are running Stata/MP and 0 otherwise.

    c(processors) returns a numeric scalar equal to the number of processors/cores that Stata/MP is currently set to
        use.  It returns 1 if you are not running Stata/MP.

    c(processors_lic) returns a numeric scalar equal to the number of processors/cores that your Stata/MP license
        allows.  It returns 1 if you are not running Stata/MP.

    c(processors_mach) returns a numeric scalar equal to the number of processors/cores that your computer has if you
        are running Stata/MP.  It returns missing value (.) if you are not running Stata/MP.

    c(processors_max) returns a numeric scalar equal to the maximum number of processors/cores that Stata/MP could use,
        which is equal to the minimum of c(processors_lic) and c(processors_mach).  It returns 1 if you are not running
        Stata/MP.

    c(mode) returns a string containing "" or "batch", depending on whether Stata was invoked in interactive mode (the
        usual case) or batch mode (using, perhaps, the -b option of Stata for Unix).

    c(console) returns a string containing "" or "console", depending on whether you are running a windowed version of
        Stata or Stata(console).

    c(os) returns a string containing "MacOSX", "Unix", or "Windows", depending on the operating system that you are
        using.  The list of alternatives, although complete as of the date of this writing, may not be complete.

    c(osdtl) returns an additional string, depending on the operating system, that provides the release number or other
        details about the operating system.  c(osdtl) is often "".

    c(machine_type) returns a string that describes the hardware platform, such as "PC", "PC (64-bit x86-64)",
        "Macintosh (Intel)", or "Oracle Solaris".

    c(byteorder) returns a string containing "lohi" or "hilo", depending on the byte order of the hardware.  Consider a
        two-byte integer.  On some computers, the most-significant byte is written first, so x'0001' (meaning the byte
        00 followed by 01) would mean the number 1.  Such computers are designated "hilo".  Other computers write the
        least-significant byte first, so x`0001' would be 256, and 1 would be x'0100'.  Such computers are designated
        "lohi".

    c(username) returns the user ID (provided by the operating system) of the user currently using Stata.

板凳
shevaze 发表于 2013-6-14 09:28:32
蓝色 发表于 2013-6-14 00:16
Title

     creturn -- Return c-class values
谢谢斑竹

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-3-3 05:24