Modifying the FrontPage Date/Time Web Component

If you've ever inserted a date or time using Date and Time on the Insert menu in FrontPage, you may have wondered how you can change the date and/or time format. Well, you're not alone.  We recently had the following comment from a customer asking for just this kind of information.

I want to know the parameters that can be changed, and how to change them, such as language to use - my web server is in Germany but I want to display months in English, not German, and UK time, not German. and eg what do the following mean: s-format="%d %B %Y" and what are the options for these and other parameters.

Before I tell you how you can change the date and time formats, I should first explain that the date and time component is a server-side date and time component, which means that it displays the time on the server not the time on the client, so there's no way to specify a time zone (or in the case of the above comment, UK time instead of German time).  However, formatting is another thing altogether.  By changing the value of the s-format parameter, you can change how the date and time displays.

Let's backup a bit.  When you insert a date or time using the Date/Time Web component in FrontPage, FrontPage inserts webbot code.  This code looks somewhat like the following:

<!--webbot bot="Timestamp" S-Type="REGENERATED" S-Format="%m/%d/%Y %I:%M %p" -->

The bot parameter specifies "Timestamp." This is what tells the FrontPage Server Extensions which Web component the webbot is using.  You can't change this parameter without completely wiping out your date or time.  (I know this seems like it should go without saying, but ... well, I've learned that almost nothing can go completely without saying.) However, the other two parameters, S-Type and S-Format, can be edited.

The S-Type parameter can have values of "EDITED" and "REGENERATED."  Other values don't necessarily break the webbot, but they also don't mean anything. These are the only values that FrontPage generates from the Date and Time dialog box, but to be completely honest, I didn't really notice a difference between the dates and/or times that these two values generate.

S-Format can have any combination of several values, and the ones that you use will affect how the date and/or time displays.  The following table provides a list of possible values and a description of each value.  (By the way, casing is critically important here.  For example, an uppercase M returns the minutes while a lowercase m returns the month.)

The examples in the following section use the following date/time as a guide:
Friday, December 17, 2004 06:29:42 PM

Parameter Value Description Example
%A Day of the week in long format. (Date) Friday
%a Day of the week in short format. (Date) Fri
%B Month spelled out in long format. (Date) December
%b Month spelled out in short format. (Date) Dec
%m Month in number format. (Date) 12
%d Day of the month. (Date) 17
%Y Year in long format. (Date) 2004
%y Year in short format. (Date) 04
%I Hour in 12-hour format. (Time) 06
%H Hour in 24-hour format. (Time) 18
%M Minutes. (Time) 29
%S Seconds. (Time) 42
%p Shows PM or AM. (Time) PM

You can create date and time formats using any combination of the above parameter values.  In addition, as long as a percent sign (%) preceeds each parameter value that indiates a date or time element, you can use extra characters, symbols, and spaces between these parameter values.  For example, you could create the date/time as shown in the example preceeding the table by using an S-Format value of "%A, %B %d, %Y %H:%M:%S %p".

Note   You can use the percent sign (%) as a symbol by placing two percent signs together (%%). The FrontPage Server Extensions see this as an escape character sequence and display a single percent sign.

Before concluding, I should note that the date and time displayed when you use the Date/Time Web component is the date and/or time a page was saved NOT the current date or time on the server or a visitor's computer.  For the current date or time, you would need to use server-side scripting, such as ASP, to get the server's date or time or client-side scripting, such as JavaScript, to get the date or time on the visitor's computer.  (For JavaScript that displays the date and/or time, see Dates, dates, and more dates...).

Comments (39)

  1. Gandalfe says:

    Lisa, how about a New Year’s post of your favorite work-related blogs? :o)

  2. Lisa Wollin says:

    Good idea, Gandalfe. Stay tuned…

  3. Victor Delta says:

    Thanks for this helpful summary. However, every time I enter a datestamp in FrontPage, it comes up as with two digits (ie dd). This is fine after the 10th of the month but I hate, for example, 06 May – the leading zero is so unnecessary/unsightly (you would never write that!). Is there any (simple) way I can insert dates without the leading zero ie d instead of dd (as per Excel formats etc)?

  4. Xetere says:

    re: "but I want to display months in English, not German"

    The part above wasn’t explicitly answered, but I assume that language is also part of the server-side date and time component?? most of our pages are in English but we have some French and Spanish pages that I’d liove to use the timestamp webbot.

    ANy workarounds or is it formulating an .asp script?

  5. College Loan says:

    Very good details and new. keep it posted.

  6. Very many thanks for a good work. Nice and useful. Like it!

  7. Jenna,Jenna says:

    Hi, you have amazing site.. Look at Britney boobs and ass, exclusive photo and video <a href="">Britney”>">Britney Spears</a> [url=]Britney Spears[/url] see you.

  8. Hello, you have great site. Look at Jennifer ass, exclusive photo and video <a href="">Jennifer”>">Jennifer Lopez</a> [url=]Jennifer Lopez[/url] goodbye!

  9. Best site, good job! This i found in internet <a href="">Hydrocodone</a>”>">Hydrocodone</a> [url=]Hydrocodone[/url] goodbye!

  10. Best site, good job! This i found in internet <a href="">Hydrocodone</a>”>">Hydrocodone</a> [url=]Hydrocodone[/url] goodbye!

  11. Best site, good job! This i found in internet <a href="">Hydrocodone</a>”>">Hydrocodone</a> [url=]Hydrocodone[/url] goodbye!

  12. Thanks for the great tips about <a href=""”>" title="best interest rate">best interest rate</a> and [URL=]best interest rate[/URL]

  13. Maria,Maria says:

    Very good site <a href=" ">Car Insurance</a> [url=]Car Insurance[/ur] goodbye!

Skip to main content