Textfield and DataFormat

Posted by Community Admin on 03-Aug-2018 13:25

Textfield and DataFormat

All Replies

Posted by Community Admin on 13-May-2011 00:00
Hello,
I'm tring to use a sitefinity:textfield in a download list (list type, not table) for showing a data and I've set DataFormat to DataFormat="0:dd/MM/yyyy", it won't format my data ... I still see the time...what am I doing wrong?
Thanks
Paolo
Posted by Community Admin on 16-May-2011 00:00
Hi Paolo,

It looks like that we do not set this property in our code. Is it possible to use FieldListView and its property Format

Kind regards,
Ivan Dimitrov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Posted by Community Admin on 18-May-2011 00:00
Hello Ivan,
I got no luck.......doing  :

<sitefinity:FieldListView runat="server" ID="test" Format="dd/MM/yyyy" Properties="DateCreated" />
  
or
  
<sitefinity:FieldListView runat="server" ID="test" Format="0:dd/MM/yyyy" Properties="DateCreated" />

won't do anything...what am I doing wrong?
Posted by Community Admin on 23-May-2011 00:00
Hi Paolo,

You can either try using text field and format it using serverside expressions:
<sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# ((DateTime)Eval("DateCreated")).
ToString("dd/MM/yyyy")
%>' />

or
Best wishes,
Radoslav Georgiev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Posted by Community Admin on 14-Oct-2011 00:00
For Sitefinity 4, answer here
<sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("EventStart", "0:MMM dd")%>' />
Mark
This thread is closed