More in this section

Forums / Developing with Sitefinity / Formatting of custom DateTime metafield

Formatting of custom DateTime metafield

2 posts, 1 answered
  1. Alessio S.
    Alessio S. avatar
    37 posts
    31 May 2010
    03 Jan 2011
    Link to this post
    I've added a custom metafield of type DateTime to the Libraries module, then I changed the dowload list template adding a label for the new metafield with the field's name as ID:

    <asp:Label ID="MyDate" runat="server" />

    The value is shown but it's formatted with a default format which is not the same used e.g. by the UploadDate label in the same template. How can I control the formatting in such situation?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    03 Jan 2011
    Link to this post
    Hello Alessio,

    You can try using DateTimeLiteral which has a property DateFormatString

    <telerik:DateTimeLiteral ID="commentDateLiteral" runat="server" DateFormatString="" />

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 1 answered