Formatting Data within a dataset

  • Thread starter Thread starter Mike Fellows
  • Start date Start date
M

Mike Fellows

I have a dataset wich contains 3 columns

i wish to format the 3rd column which contains a date field
but it shows the date as dd/mm/yyyy 00:00:00

i need to remove the time part of the data (i presuming using some sort of
format)

any help would be greatly appreciated


Mike Fellows
 
Below is my function that i need to format the Dataset in
i need to format ds.tables(0).columns.item(2) but i have no idea how to do
it


Function LeadReceivedNoMortgageSourced(ByVal Datagrid As
System.Web.UI.WebControls.DataGrid, ByVal Title As String)
Dim conn As New System.Data.SqlClient.SqlConnection(SQLstrConn)
Dim sql As String = "LeadReceivedNotMortgageSourced"
Dim da As New System.Data.SqlClient.SqlDataAdapter(sql, conn)
Dim ds As DataSet = New DataSet()
ds.Tables(0).Columns.Item(0).ColumnName = "ID "
ds.Tables(0).Columns.Item(1).ColumnName = "Surname "
ds.Tables(0).Columns.Item(2).ColumnName = "Date Lead Received"
ds.Tables(0).Columns.Item(2).ColumnName.Format("o:d")
da.Fill(ds)
Datagrid.DataSource = ds.Tables(0)
Datagrid.DataBind()
Title = "Lead Recieved Not Mortgage Sourced"
End Function


thanks


Mike
 
Hi Mike,

You got a nice link from Ken, I asume if you not post back that that is the
solution

Cor
 
Back
Top