Guide Categories:  Home | Drivers | Web Development | Hardware | Internet | Q & A | Tips & Tricks | Write
Web Development Silicon Guide
Search SiliconGuide:

Site Services:
Log In
Sign Up

Guides:
Getting Sponsored
Using SSI

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 Friday, 05-Sep-2008 18:54:21 EDT
%A Full weekday name Friday, 05-Sep-2008 18:54:21 EDT
%b Short month name Friday, 05-Sep-2008 18:54:21 EDT
%B Full month name Friday, 05-Sep-2008 18:54:21 EDT
%c Proper way of formatting the time in the time zone where the server is located. Friday, 05-Sep-2008 18:54:21 EDT
%C Default time format Friday, 05-Sep-2008 18:54:21 EDT
%d Day of the month Friday, 05-Sep-2008 18:54:21 EDT
%D Current date in the standard format of mm/dd/yy Friday, 05-Sep-2008 18:54:21 EDT
%e Day of the month, without any zeroes. Friday, 05-Sep-2008 18:54:21 EDT
%h Same as %b Friday, 05-Sep-2008 18:54:21 EDT
%H Current hour in 24 hour format Friday, 05-Sep-2008 18:54:21 EDT
%I Current hour in 12 hour format Friday, 05-Sep-2008 18:54:21 EDT
%j Day of year Friday, 05-Sep-2008 18:54:21 EDT
%m Month of year Friday, 05-Sep-2008 18:54:21 EDT
%M Current minute Friday, 05-Sep-2008 18:54:21 EDT
%n Break line  
%p Indicates whether it is AM or PM Friday, 05-Sep-2008 18:54:21 EDT
%r Time in the format of 2:13:35 PM Friday, 05-Sep-2008 18:54:21 EDT
%R Time as 16:34 Friday, 05-Sep-2008 18:54:21 EDT
%S Current second Friday, 05-Sep-2008 18:54:21 EDT
%t Tabulation  
%T Time in the format of 14:23:54 Friday, 05-Sep-2008 18:54:21 EDT
%U Number of the current week Friday, 05-Sep-2008 18:54:21 EDT
%w Current week day Friday, 05-Sep-2008 18:54:21 EDT
%W Same as %U Friday, 05-Sep-2008 18:54:21 EDT
%x Date format of Local Country Friday, 05-Sep-2008 18:54:21 EDT
%X Time format of Local Country Friday, 05-Sep-2008 18:54:21 EDT
%y Year in two digit format Friday, 05-Sep-2008 18:54:21 EDT
%Y Year in four digit format Friday, 05-Sep-2008 18:54:21 EDT
%Z The name of the Local Time Zone Friday, 05-Sep-2008 18:54:21 EDT

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:

Friday, 05-Sep-2008 18:54:21 EDT

Next Page:
Including files
Skip Ahead:
Executing CGI Scripts
SSI Hosting and Conclusion

Home | Web Development | Hardware and Upgrading | Internet | Technical Questions & Answers | Tips and Tricks | Write to Us

Last modified on: Tuesday, 15-Oct-2002 12:44:08 EDT
Copyright © 1999 - 2008 Eric Georgieff, All Rights Reserved
Powered by Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 (More Info)