Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • wildlife 54 posts 74 karma points
    Jun 05, 2010 @ 00:13
    wildlife
    0

    How do you display Date Picker with Time information in a different format?

    I have a date picker with time field in my document type.  I want that data to appear on my page.  The page is being generated by an XSLT file for an Events Listing.  It is important that we have the date and time of each event on this listing page.

    I have the field data displaying on the page right now by using the following code:

    <xsl:value-of select="data [@alias = 'beginDate']"/>

    But this displays the field data in the following format:

    2010-05-01T09:00:00

    What I want instead is for it to display in this format:

    Friday, June 04, 2010 - 3:55:27 PM

    I tried using the following code:

    <xsl:value-of select="umbraco.library:LongDate(@beginDate, 'Boolean WithTime', 'String TimeSplitter')"/>

    But that didn't display anything.  Doing it this way worked with @createDate when I applied the same formatting to the create date of the file, but it isn't working with my @beginDate field.

    Does anyone know how I can get the date and time to display in the format I need?

     

     

  • wildlife 54 posts 74 karma points
    Jun 05, 2010 @ 04:25
    wildlife
    0

    Solved it myself.

    <xsl:value-of select="umbraco.library:LongDate(data[@alias = 'beginDate'], 'Boolean WithTime', ' - ')"/>
Please Sign in or register to post replies

Write your reply to:

Draft