Specify the display format in the DataBinder.Eval method as
<%# DataBinder.Eval(Container.DataItem,"seminarDate"," {0:dddd,MMM dd,yyyy}")%>
to display the date in the format that u mentioned
"Darrel" wrote:
> I'm stumped on something that would seem to be pretty simple.
>
> I have data bound to a repeater control. One of the fields is a date field
> from the SQL table:
>
> <%#DataBinder.Eval(Container.DataItem, "seminarDate")%>
>
> This, by default, displays as:
>
> 10/12/2004 12:00:00
>
> I'd like to format it as:
>
> Tuesday, October 12, 2004
>
> Can that be done with inline functions?
>
> I've tried something like this:
>
> <%# microsoft.VisualBasic.format(DataBinder.Eval(Conta iner.DataItem,
> "seminarTimes")), "DDDD") %>
>
> But I get a " Overload resolution failed because no accessible 'ToString'
> can be called without a narrowing conversion: " error.
>
>
>
> -Darrel
>
>
>
>
>
>
>
>
>
|