Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Formating a DataTable Colum

Author  Topic 

Sirchrisak
Starting Member

19 Posts

Posted - 2005-08-04 : 10:23:20
I am returning a recordset with date value from SQl200 into my grid.I would like to format the colum with the date value. i used the following code but no effect on the display though it did not complain of any error
[CODE]dim myDate as Date
For i =0 to dt.Rows.cont-1
mydate = CTYPE(dt.rows(i).item("Date"),Date)
mydate=mydate.ToLongDateString()
dt.rows(i).item("Date")=mydate
next
datagrid1.datasource=dt
datagrid1.databing[/CODE]
despite this code it will still return the old format that came from Sql200 which i don't want to display to User
Plz help

Chris
   

- Advertisement -