Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all,
I am trying to render the date and time in 24 hour format using the DatePicker with Time data type.
I've created the document type and entered the time and date. To render the time in 24hr format I'm using the following xsl...
<xsl:value-of select="umbraco.library:FormatDateTime($currentPage/datePickerWithTime, 'MMMM d, yyyy, Hmm')"/>
When the time is in the AM (for example 7 am) it renders "January 28, 2012, 700"
Surely this should be 0700! I am exporting date and time for an iCal file and need the 0 in front of AM times in order for it to import properly.
Does anyone know of a way to render the proper 24 hour clock for AM times, eg 0600, 0700 etc insted of 700 , 600 etc ?
Tried hh instead but it just uses 0700 for both 7am and 7pm, 0600 for both 6am and 6pm etc..
Aha, just figured it out. If I use HH it displays as per 24hr clock ie 0700 and 1900.
The umbraco page on FormatDateTime only mentions h/hh/H for displaying the hour.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
FormatDateTime bug
Hi all,
I am trying to render the date and time in 24 hour format using the DatePicker with Time data type.
I've created the document type and entered the time and date. To render the time in 24hr format I'm using the following xsl...
<xsl:value-of select="umbraco.library:FormatDateTime($currentPage/datePickerWithTime, 'MMMM d, yyyy, Hmm')"/>
When the time is in the AM (for example 7 am) it renders "January 28, 2012, 700"
Surely this should be 0700! I am exporting date and time for an iCal file and need the 0 in front of AM times in order for it to import properly.
Does anyone know of a way to render the proper 24 hour clock for AM times, eg 0600, 0700 etc insted of 700 , 600 etc ?
Tried hh instead but it just uses 0700 for both 7am and 7pm, 0600 for both 6am and 6pm etc..
Aha, just figured it out. If I use HH it displays as per 24hr clock ie 0700 and 1900.
The umbraco page on FormatDateTime only mentions h/hh/H for displaying the hour.
is working on a reply...