ndr-itsolutions
asked on
Date \ Time issue
I'm new to ASP web development and SQL, I've been developing a small web application and so far all is good, I do have one annoying issue around the date, in my gridviews and also in the SQL database dates are displayed as the following:
Any advice on how to elimnate this issue ? I'm using SQL 2008 Express and the datetime data type.
Any advice on how to elimnate this issue ? I'm using SQL 2008 Express and the datetime data type.
You don't have any control over how datetimes are stored in SQL Server, but you have complete control over how they're displayed in your ASP.Net application. What, specifically, were you looking to do?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can pick your date time format here:
Date Time Formats
if you want to get rid of the time and leave the date use:
Date Time Formats
if you want to get rid of the time and leave the date use:
date.ToString("dd/MM/yy")
Format the Date within the SQL Itself.
In the Query use "Convert(Varchar, YourDateField,101) as YourDateField".
In the Query use "Convert(Varchar, YourDateField,101) as YourDateField".