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

Saturday, 07-Nov-2009 14:02:31 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)