locked
Date Format Issue on Default.aspx Page RRS feed

  • Question

  • User-573569638 posted

    When I go to default.aspx page and look at the events section the first column is showing as date with the start time behind it.  When I look at the code it is using the correct date format (as far as I know).  Anyone have any ideas?   I just want it to show mm/dd/yyyy.

     

    <asp:GridView AutoGenerateColumns="False" DataSourceID="SqlDataSource2" ID="GridView1"

    runat="server" ShowHeader="False" Width="410px" CssClass="eventlist" GridLines="None">

    <Columns>

    <asp:BoundField DataField="starttime" DataFormatString="{0:d}" HeaderText="starttime"

    SortExpression="starttime"></asp:BoundField>

    <asp:TemplateField>

    <ItemTemplate>

    <asp:HyperLink ImageUrl="images/icon_event.gif" runat="server" NavigateUrl='<%# Eval("id","Events_download.ashx?Eventid={0}") %>' />

    </ItemTemplate>

    </asp:TemplateField>

    <asp:TemplateField HeaderText="id" InsertVisible="False" SortExpression="id">

    <ItemTemplate>

    <asp:Label ID="Label1" runat="server" Text='<%# ShowDuration(Eval("starttime"),Eval("endtime")) %>' />

    </ItemTemplate>

    </asp:TemplateField>

    <asp:HyperLinkField DataNavigateUrlFields="id" DataNavigateUrlFormatString="events_view.aspx?eventid={0}"

    DataTextField="title"></asp:HyperLinkField>

    <asp:BoundField DataField="locationname" HeaderText="locationname" SortExpression="locationname"

    NullDisplayText=""></asp:BoundField>

    </Columns>

    </asp:GridView>

    Friday, December 9, 2005 1:02 AM

Answers