#
#
#end
The Silicon Guide To
Using Server Side Includes
The Config Command
To configure the how the date commands display their information
(DATE_GMT, DATE_LOCAL and LAST_MODIFIED), use the CONFIG command. The syntax for
this command is:
<!--#config timefmt="FORMATTING_GOES_HERE" -->,
where FORMATTING_GOES_HERE is any combination of the following formatting
codes:
Formatting Code |
Description |
Real-time Example |
%a |
Short weekday name |
Fri |
%A |
Full weekday name |
Friday |
%b |
Short month name |
Mar |
%B |
Full month name |
March |
%c |
Proper way of formatting the time in the time zone where the server is
located. |
Fri Mar 14 22:24:54 2025 |
%C |
Default time format |
20 |
%d |
Day of the month |
14 |
%D |
Current date in the standard format of mm/dd/yy |
03/14/25 |
%e |
Day of the month, without any zeroes. |
14 |
%h |
Same as %b |
Mar |
%H |
Current hour in 24 hour format |
22 |
%I |
Current hour in 12 hour format |
10 |
%j |
Day of year |
073 |
%m |
Month of year |
03 |
%M |
Current minute |
24 |
%n |
Break line |
|
%p |
Indicates whether it is AM or PM |
PM |
%r |
Time in the format of 2:13:35 PM |
10:24:54 PM |
%R |
Time as 16:34 |
22:24 |
%S |
Current second |
54 |
%t |
Tabulation |
|
%T |
Time in the format of 14:23:54 |
22:24:54 |
%U |
Number of the current week |
10 |
%w |
Current week day |
5 |
%W |
Same as %U |
10 |
%x |
Date format of Local Country |
03/14/25 |
%X |
Time format of Local Country |
22:24:54 |
%y |
Year in two digit format |
25 |
%Y |
Year in four digit format |
2025 |
%Z |
The name of the Local Time Zone |
UTC |
For example if I wanted to display the current time in the format Month dd, YYYY; I
would insert the following code into my HTML document:
<!--#config timefmt="%B %d, %Y"-->
<!--#echo var="DATE_LOCAL"-->
which would yield the following output:
March 14, 2025
Next Page:
Including files
Skip Ahead:
Executing CGI Scripts
SSI Hosting and Conclusion