Hi I'm trying to format a datetime field to just show the date. The datetime is bound to an asp:label and I have tried the following....
In all cases I get a green wavy line under the equation and the tip help says "Validation (ASP.Net): If this attribute value is enclosed in quotation marks, the quotation marks must match.
String.Format("{0}", DateTime.Now) works fine.
What have I done wrong....
I've not failed! Just found 100 ways that don't work...yet!
Code:
Text= String.Format("{0:D}", '<%# Bind("CReviewDate") %>')
and
Text= String.Format("{0:D}", <%# Bind("CReviewDate") %>)
and
Text= String.Format("{0:D}", <%# Bind('CReviewDate') %>)
and
Text= String.Format("{0:D}", <%# Bind(CReviewDate) %>)
String.Format("{0}", DateTime.Now) works fine.
What have I done wrong....
I've not failed! Just found 100 ways that don't work...yet!