File: time.htm

package info (click to toggle)
extrema 4.3.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 19,212 kB
  • ctags: 6,452
  • sloc: cpp: 86,428; sh: 8,229; makefile: 814
file content (86 lines) | stat: -rw-r--r-- 3,291 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<HTML>
<HEAD>
<TITLE>TIME</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF" fgcolor="#000000">

<P><A NAME="time"></A>
<font size="+3" color="green"><B>TIME</B></font></P>
<P>
<TABLE border="1" cols="2" frame="box" rules="all" width="572">
<TR>
<TD width="15%" valign="top"><B>Syntax</B>:</TD>
<TD width="85%"><CODE>
string = TIME<br />
string = TIME('format')</CODE>
</TD></TR>
</table></p>
<p>
 The <CODE>TIME</CODE> function can have one argument or no arguments.
 If no argument is given, it returns a string which contains the current time with the format
 <CODE>hh:nn:ss</CODE>. A format argument can be provided, as shown in the table
 below. The seperator used in the format will be used in the output string.</p>
<p>
<center><table cols="2" border="1">
<tr>
<td><i>specifier</i></td><td><i>displays</i></td>
</tr><tr>
<td><CODE><font color="blue">h</font></CODE></td>
<td>Displays the hour as a number without a leading zero (0-23)</td>
</tr><tr>
<td><CODE><font color="blue">hh</font></CODE></td>
<td>Displays the hour as a number with a leading zero (00-23)</td>
</tr><tr>
<td><CODE><font color="blue">n</font></CODE></td>
<td>Displays the minute as a number without a leading zero (0-59)</td>
</tr><tr>
<td><CODE><font color="blue">nn</font></CODE></td>
<td>Displays the minute as a number with a leading zero (00-59)</td>
</tr><tr>
<td><CODE><font color="blue">s</font></CODE></td>
<td>Displays the second as a number without a leading zero (0-59)</td>
</tr><tr>
<td><CODE><font color="blue">ss</font></CODE></td>
<td>Displays the second as a number with a leading zero (00-59)</td>
</tr><tr>
<td><CODE><font color="blue">t</font></CODE></td>
<td>Displays the time in short format (hh:mm am/pm)</td>
</tr><tr>
<td><CODE><font color="blue">tt</font></CODE></td>
<td>Displays the time in long format (hh:mm:ss am/pm)</td>
</tr><tr>
<td><CODE><font color="blue">am/pm</font></CODE></td>
<td>Uses the 12-hour clock for the preceding <CODE>h</CODE> or
 <CODE>hh</CODE> specifier, and displays <font color="orange">am</font>
 for any hour before noon, and <font color="orange">pm</font> for any hour after noon. The
 <CODE>am/pm</CODE> specifier can use lower, upper, or mixed case,
 and the result is displayed accordingly.</td>
</tr></table></center></p>
<p>
 <font size="+1" color="green">Examples</font></P>
<p>
<table border="0" cols="2">
<tr>
 <td align="center" bgcolor="#CCFFFF"><em>function</em></td>
 <td align="center" bgcolor="#FF9966"><em>result</em></td>
</tr><tr>
 <td><CODE><font color="blue">TIME</font></CODE></td>
 <td>&nbsp;<font color="orange">12:14:26</font></td>
</tr><tr>
 <td><CODE><font color="blue">TIME('hh::nn::ss am/pm')</font></CODE></td>
 <td>&nbsp;<font color="orange">12::14::26 pm</font></td>
</tr><tr>
 <td><CODE><font color="blue">TIME('t')</font></CODE></td>
 <td>&nbsp;<font color="orange">12:14 PM</font></td>
</tr><tr>
 <td><CODE><font color="blue">TIME('tt')</font></CODE></td>
 <td>&nbsp;<font color="orange">12:14:26 PM</font></td>
</tr></table></p>
<p>
 <a href="date.htm"><img align="middle" border="0" src="../../shadow_left.gif">&nbsp;
 <font size="+1" color="olive">DATE</font></a><br />
 <a href="ucase.htm"><img align="middle" border="0" src="../../shadow_right.gif">&nbsp;
 <font size="+1" color="olive">UCASE</font></a>
</P>
</BODY>
</HTML>