Take the 2-minute tour ×  is there a way that I can format a
Date binded in a ListView?  I have this snippet of ListView
<ListView ID="lvView" runat="server">         //... some bounded
data         <asp:Label ID="lblDate" runat="server" Text='<%#
Bind("RequiredDate") %>' />         //... another bounded data
Since RequiredDate is a DateTime it will display somethine like
this 10/20/2010 11:08:55 AM  What I want is to Format that date
to output something like this Oct. 20, 2010. Normally if it is a
DateTime I can write something like this
requiredDate.ToString("MMMM dd, yyyy") but inside the ListView
binded data I cannot do that.  I don't want to use
OnItemDatabound. I just want it to be formatted inline. Is this
possible?  share|improve this question add comment  3 Answers
up vote 16 down vote accepted  Should be like...  Text='<%#
Bind("RequiredDate", "{0:MMM dd, yyyy}") %>' share|improve this
answer I receive an error "Input string was not in correct
format" –  rob waminal Oct 20 '10 at 4:00 you should