Solved

Date \ Time issue

Posted on 2013-01-31
4
220 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

751 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