Need Help with Convert SQL.
Hi
I am using a typed dataset and I using Convert to try to trim one of my datetimes to just date(I am using mssql2005).
So I have something like this in my sql query.
CONVERT(varchar, ExpiryDate, 101) AS ExpiryDate
Now when I run it in the query builder it trims it down to just the date but when I run it live it still has the time.
I am attaching it to a grdivew. So first I made a bound field:
BoundField endDate = new BoundField();
endDate.HeaderText = "Expiry Date";
endDate.DataField = "ExpiryDate";
Then I return a datatable from my 3 tier architecture and use this as the Datasource and then bind it but I keep getting it with the time included.
Did I do something wrong?
|