Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Deperate Help needed on Date/Time Formating


Message #1 by "Tim Farrell" <timothy.farrell@c...> on Fri, 27 Sep 2002 16:33:57
I have a dropdown list box that displays a list of dates submitted to a 
db.  The problem is that I need to truncate down the date/time record to 
display only the date and not the time.  The time in this instance is 
irrelevant and not needed.

Does anyone know of a way that I can accomplish this?

Here is my current dropdown list script:
strSQL="select distinct wed from LIEF_tbl order by wed"
    Dim cmd8 as New SQLCommand(strSQL,Conn)
    conn.Open()
    myReader = cmd8.ExecuteReader()
    wed.DataSource = myReader
    wed.DataBind()
    myReader.Close()
    Conn.close()

Here is the dropdown list control script:
<asp:DropDownList ID="wed" DataValueField="wed" DataTextField="wed" 
Runat="server"></asp:DropDownList>

Thank you for your help.

Sincerely,

Tim

  Return to Index