pulpfiction Posted March 8, 2006 Share Posted March 8, 2006 (vs 2003/ asp.net/vb)i am getting the datefld from the table (sql server) and the field type is "small date time" in the table the field looks like "10/26/2003"but displays like this in the datagrid,10/26/2003 12:00:00 AMi want it to display jus the date. Help!!!Thank you. Link to comment Share on other sites More sharing options...
pulpfiction Posted March 9, 2006 Author Share Posted March 9, 2006 Found out the soln,in sql query--> convert(varchar,[Datefld],103) as [Datefld] Link to comment Share on other sites More sharing options...
aspnetguy Posted March 13, 2006 Share Posted March 13, 2006 you could do it in the .net code also DateTime d = DateTime.Now;Response.Write(d.ToShortDateString()); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now