Size: 693
Comment:
|
← Revision 3 as of 2023-06-07 19:10:40 ⇥
Size: 534
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
Stata exposes its configuration and internal parameters by the `c()` class. | Stata exposes '''system parameters''' in the `c()` class of [[Stata/StoredResults|stored results]]. |
Line 11: | Line 11: |
== Access == | == Usage == |
Line 15: | Line 15: |
---- == Usage == === Create Date Stamp === Use `c(current_date)`. which is the date as `"dd MMM yyyy"`. {{{ local ts = string(td(`c(current_date)'), "%tdCYND") }}} === Create Datetime Stamp === Use `c(current_time)`, which is the time as `"hh:mm:ss"`, in addition to `c(current_date)` as shown above. |
`c(current_date)` and `c(current_time)` are the system date and time, respectively. They are stored in the formats `"dd MMM yyyy"` and `"hh:mm:ss"`. |
Stata System Parameters
Stata exposes system parameters in the c() class of stored results.
Contents
Usage
Use creturn list to view all c() class variables.
c(current_date) and c(current_time) are the system date and time, respectively. They are stored in the formats "dd MMM yyyy" and "hh:mm:ss".
local ts = string(td(`c(current_date)'), "%tdCYND") + "_" + string(tc(`c(current_time)'), "%tcHM")