Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Date \ Time issue

Posted on 2013-01-31
4
Medium Priority
?
226 Views
Last Modified: 2013-01-31
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:

datetime datatype
Any advice on how to elimnate this issue ? I'm using SQL 2008 Express and the datetime data type.
0
Comment
Question by:ndr-itsolutions
4 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 38840073
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?
0
 
LVL 20

Accepted Solution

by:
informaniac earned 2000 total points
ID: 38840092
0
 
LVL 42

Expert Comment

by:Meir Rivkin
ID: 38840096
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.ToString("dd/MM/yy")

Open in new window

0
 
LVL 3

Expert Comment

by:Nalinkumarbalaji
ID: 38840110
Format the Date within the SQL Itself.

In the Query use "Convert(Varchar, YourDateField,101) as YourDateField".
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question