Textfield and DataFormat
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
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
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"
/>
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
")
%>' />
For Sitefinity 4, answer here.
<
sitefinity:TextField
runat
=
"server"
DisplayMode
=
"Read"
Value='<%# Eval("EventStart", "0:MMM dd")%>' />
Mark