Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

Diff of /trunk/doc/en/html/macro/command/getdate.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3226 by maya, Tue Mar 24 09:37:20 2009 UTC revision 3227 by maya, Tue Mar 24 15:10:33 2009 UTC
# Line 1  Line 1 
1  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2    "http://www.w3.org/TR/html4/strict.dtd">    "http://www.w3.org/TR/html4/strict.dtd">
3  <html>  <html>
4  <head>  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6    <title>getdate</title>    <title>getdate</title>
7    <meta http-equiv="Content-Style-Type" content="text/css">    <meta http-equiv="Content-Style-Type" content="text/css">
8    <link rel="stylesheet" href="../../style.css" type="text/css">    <link rel="stylesheet" href="../../style.css" type="text/css">
9  </head>  </head>
10    
11  <body>  <body>
12    
13    
14  <h1>getdate</h1>  <h1>getdate</h1>
15    
16  <p>  <p>
17  Gets current date.  Gets current date.
18  </p>  </p>
19    
20  <pre class="macro-syntax">  <pre class="macro-syntax">
21  getdate &lt;strvar&gt; [&lt;format&gt;]  getdate &lt;strvar&gt; [&lt;format&gt;]
22  </pre>  </pre>
23    
24  <h2>Remarks</h2>  <h2>Remarks</h2>
25    
26  <p>  <p>
27  Returns the current date in the string variable &lt;strvar&gt;, with the default format "YYYY-MM-DD".  Returns the current date in the string variable &lt;strvar&gt;, with the default format "YYYY-MM-DD".
28  The user can specify the format same as <a href="http://msdn2.microsoft.com/en-us/library/fe06s4ak(VS.80).aspx">strftime</a>. And also, the default format equals "%Y-%m-%d" at the &lt;format&gt; argument.  The user can specify the format same as <a href="http://msdn2.microsoft.com/en-us/library/fe06s4ak(VS.80).aspx">strftime</a>. And also, the default format equals "%Y-%m-%d" at the &lt;format&gt; argument.
29  </p>  </p>
30    
31  <p>  <p>
32  The behavior of the getdate command specified with the format equals the gettime command specified with the same format.  The behavior of the getdate command specified with the format equals the gettime command specified with the same format.
33  </p>  </p>
34    
35  <p>  <p>
36  This command returns one of the following values in the system variable "result":  This command returns one of the following values in the system variable "result":
37  </p>  </p>
38    
39  <table>  <table>
40    <thead>    <thead>
41      <tr>      <tr>
42        <th>Value</th>        <th>Value</th>
43        <th>Meaning</th>        <th>Meaning</th>
44      </tr>      </tr>
45    </thead>    </thead>
46    
47    <tbody>    <tbody>
48      <tr>      <tr>
49        <td>0</td>        <td>0</td>
50        <td>        <td>
51           Normal success. &lt;strvar&gt; is stored.           Normal success. &lt;strvar&gt; is stored.
52        </td>        </td>
53      </tr>      </tr>
54    
55      <tr>      <tr>
56        <td>1</td>        <td>1</td>
57        <td>        <td>
58          Error. &lt;strvar&gt; is not stored because a length of the generated string exceeds the upper limit -255 characters-.          Error. &lt;strvar&gt; is not stored because a length of the generated string exceeds the upper limit -255 characters-.
59        </td>        </td>
60      </tr>      </tr>
61    
62      <tr>      <tr>
63        <td>2</td>        <td>2</td>
64        <td>        <td>
65          Error. &lt;format&gt; is invalid.          Error. &lt;format&gt; is invalid.
66        </td>        </td>
67      </tr>      </tr>
68    </tbody>    </tbody>
69  </table>  </table>
70    
71  <h2>Example</h2>  <h2>Example</h2>
72    
73  <pre class="macro-example">  <pre class="macro-example">
74  ;Stores the current date to "datestr" variable with YYYY-MM-DD format.  ;Stores the current date to "datestr" variable with YYYY-MM-DD format.
75  getdate datestr  getdate datestr
76    
77  ;Stores the current date with the user format to "logfile" variable.  ;Stores the current date with the user format to "logfile" variable.
78  ;The format is log-YYYYMMDD-HHMMSS.txt.  ;The format is log-YYYYMMDD-HHMMSS.txt.
79  getdate logfile "log-%Y%m%d-%H%M%S.txt"  getdate logfile "log-%Y%m%d-%H%M%S.txt"
80  </pre>  </pre>
81    
82  <h2>See also</h2>  <h2>See also</h2>
83  <ul>  <ul>
84    <li><a href="gettime.html">gettime</a></li>    <li><a href="gettime.html">gettime</a></li>
85    <li><a href="http://msdn2.microsoft.com/en-us/library/fe06s4ak(VS.80).aspx">strftime (MSDN Library)</a></li>    <li><a href="http://msdn2.microsoft.com/en-us/library/fe06s4ak(VS.80).aspx">strftime (MSDN Library)</a></li>
86  </ul>  </ul>
87    
88  </body>  </body>
89  </html>  </html>

Legend:
Removed from v.3226  
changed lines
  Added in v.3227

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26