Formating Date, Using updatedDate in XSLT

1) This code shows you and Example of Formating the Date in XSLT

<p><xsl:value-of select="umbraco.library:FormatDateTime(@updateDate, 'MMMM d, yyyy')"/>

(Formating Options):

Month
MMMM = Full month name spelled out ('August')
MMM = Abbreviated month name ('Aug')
MM = 2 digit month ('08')
%M = 1 or 2 digit month ('8')

Day
dddd = Full day of week ('Thursday')
ddd = Abbreviated day of the week ('Thu')
dd = 2 digit day ('06')
d = 1 or 2 digit day ('6')

Year
y or yy = 2 digit year ('99')
yyyy = 4 digit year ('1999')

Hour
h = 1 or 2 digit hour ('9')
hh = 2 digit hour ('09')
H = 24 hour ('21')

Minute
m = 1 or 2 digit minute ('3')
mm = 2 digit minute('03')

AM/PM
tt = AM/PM

RFC-1123 date-time
r = the date-time following the RFC-1123 pattern
For example: Wed, 02 Oct 2002 13:00:00 GMT

Comments

Popular posts from this blog

Umbraco Razor Sort Nodes Ascending or Descending

Umbraco Razor get Querystring

Create a .NET Contact Form that Gets the Last Url Visited in C# Can also be Used in Umbraco