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

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, 20-Nov-2009 17:52:43 EST

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 SiliconPharm Corporation, All Rights Reserved
Powered by Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny3 with Suhosin-Patch (More Info)