Reputation: 15262
What I've got:
<%# ((DateTime)Eval("StartDate")).ToShortDateString() %>
What output I need:
Saturday, 06/28/2012
What's the correct formatting string to use to get this?
Upvotes: 1
Views: 1607
Reputation: 11
Microsoft has nicely explained this on MSDN:
<%# ((DateTime)Eval("StartDate")).ToString("dddd, MM/dd/yyyy") %>
Upvotes: 1
Reputation: 62564
Try out "dddd, MM/dd/yyyy"
See Custom Date and Time Format Strings on MSDN
Upvotes: 0
Reputation: 56726
Try this one:
<%# ((DateTime)Eval("StartDate")).ToString("dddd, MM/dd/yyyy") %>
Link for further reference: custom time and date formats.
Upvotes: 5