Home     SSI Lab     CSS Templates     CSS     Htaccess     Web Design     XHTML





Introductory Topics

SSI Directives

Extending SSI


Top Resources

CSS Templates



Web Design




SSI Date Command


This shows you how to configure the date/time format and demonstrates the possible date/time formats!

Here are the basic date commands:

<!--#echo var="DATE_LOCAL" -->

<!--#echo var="DATE_GMT" -->

To configure the time

The time format is specified as in the following example:

<!--#config timefmt="%y %m %d" -->
<!--#config timefmt="%H:%M:%S" -->

Simply replace or rearrange the characters with those in the table below to get the format you need. You can also enter other formatting characters between these to get the format you want.

%a Abbreviated weekday name Mon, Tue
%A Full weekday name Monday, Tuesday
%b Abbreviated month name (also %h) Jan, Feb
%B Full month name January, February
%c current day & time of local server 11/09/03 13:45:22
%C current day & time in default format 11/09/03 13:45:22
%d Day of month as decimal number 9 (not 09)
%D Date as %m/%d/%y 28/09/02
%e Day of month as 2-digit decimal number 09
%H current hour, 24 hour clock; 00-23 14
%I current hour, 12 hour clock; 01-12 04
%j Day of year as decimal; 001-366 254
%m Month number; 01-12 11
%M current minute; 00-59 45
%n Insert a newline character
%p AM/PM of local server a.m.
%r Time as "%I:%M:%S AM | PM 11:21:45 am
%R Time as %H:%M 21:45
%S current seconds; 00-59 32
%t Insert a tab character
%T 24 hour Time as %H:%M:%S 12:32:34
%U Week of the year (also %W) 00-51; Sunday first day of week 49
%w Day of week - Sunday first day; 0-6 04
%W Week of the year 00-51; Monday as first day of week 49
%x current date formatted for servers locale 10/09/03
%X current time formatted for servers locale 11:34:52
%y Year number without century; 2-digit 99
%Y Year number without century; 4-digit 1999
Time zone name/abbrev of servers time zone. EET
%% A percent character.

Advertisement Sign up for free to PayBox.me today and get $25 just for joining AND earn up to $20 per day for participating.