Solved

Date \ Time issue

Posted on 2013-01-31
4
215 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 33

Expert Comment

by:paulmacd
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 500 total points
ID: 38840092
0
 
LVL 42

Expert Comment

by:sedgwick
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now