• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

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:

datetime datatype
Any advice on how to elimnate this issue ? I'm using SQL 2008 Express and the datetime data type.
0
ndr-itsolutions
Asked:
ndr-itsolutions
1 Solution
 
Paul MacDonaldDirector, Information SystemsCommented:
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
 
Meir RivkinFull stack Software EngineerCommented:
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
 
NalinkumarbalajiCommented:
Format the Date within the SQL Itself.

In the Query use "Convert(Varchar, YourDateField,101) as YourDateField".
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now