Date and time format strings

February 15th, 2009 by HTML-Kit Support      Tags: FAQ, Tools ChangeLog       Views: 10598
VN:F [1.7.3_972]
Rating: 0.0/5 (0 votes cast)
 
See Also:   HTML-Kit Tools ChangeLog   |   More Screenshots   |   Download HTML-Kit Tools
 

Templates and snippets in HTML-Kit Tools are able to insert the current date and time. This document lists characters and strings that can be used to change the format of date and time.

For example, the following field inserts the current date as "Feb 15, 2009″

{{_func;datetime;format="MMM dd, yyyy"}}

As you see, "MMM" inserts the first three letters of the month while "dd" and "yyyy" insert the current date and year.

The following list of strings can be used to set the datetime format used in snippets and auto datestamp labels.

d : Day of the month (1 – 31)
dd : Day of the month in two digits (01 – 31)
ddd : Abbreviated name of the day
dddd : Full name of the day

M : Month (1 – 12)
MM : Month in two digits (01 – 12)
MMM : Abbreviated name of the month
MMMM : Full name of the month

y : Year without the century (2009 is displayed as 9)
yy : Last two digits of the year (2009 displayed as 09)
yyyy : Full year including the century (2009)

h : Hour (1 – 12)
hh : Hour in two digits (01 – 12)
H : Hour in 24-hour format (0 – 23)
HH : Hour in 24-hour format in two digits (00 – 23)

m : Minute (0 – 59)
mm : Minute in two digits (00 – 59)

s : Seconds (0 – 59)
ss : Seconds in two digits (00 – 59)

t : First character of AM or PM
tt : Both characters of AM or PM

z : Time zone hour (+6)
zz : Time zone hour in two digits (+06)
zzz : Time zone hour and minutes (+06:00)

See Also:   HTML-Kit Tools ChangeLog   |   More Screenshots   |   Download HTML-Kit Tools
 
Was this article helpful?
This did not answer my questionThis answered my question (+1 rating, 3 votes)
Loading ... Loading ...
Share this on:
  • Twitter
  • Digg
  • StumbleUpon
  • Facebook
  • MySpace
  • del.icio.us
  • Sphinn
  • LinkedIn
  • Google Bookmarks
  • Live
  • Yahoo! Buzz
  • email
  • Print
 
Do you have a question that requires a reply? Please post it here for a timely and friendly reply.
 
If you have a comment, you can post it below. Not all comments are read, so be sure to use the support forum instead if you need an answer.
 
Leave a Comment or use the support forum if you have a question.

 

© 2009 HTML-Kit.com. All Rights Reserved.  |  Privacy Statement   
HTML design aid