Solved

ASP.net SQL table data types

Posted on 2011-03-01
6
237 Views
Last Modified: 2012-05-11
Hi

I have a SQL table in my ASP project as shown in the image below. I am a little concerned
about the [Start date] and [Start time] column. If I query the table the [Start date] comes up with
the date and the time. How do I change it so it just shows the date table
0
Comment
Question by:murbro
6 Comments
 
LVL 5

Expert Comment

by:sindhuxyz
ID: 35006076
SELECT convert(varchar, getdate(), 103) – dd/mm/yyyy

Here are more formats that can help u more

http://anubhavg.wordpress.com/2009/06/11/how-to-format-datetime-date-in-sql-server-2005/
0
 
LVL 22

Expert Comment

by:Om Prakash
ID: 35006095
0
 
LVL 10

Expert Comment

by:Asim Nazir
ID: 35006285
If you are using SQLServer 2008 then it has Just Date datatype. So you can use that...
0
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

 
LVL 2

Accepted Solution

by:
DJFuller earned 250 total points
ID: 35007737
Can you not add formatting to the front end of the asp.net to format so it just shows the date. Like using a label control with {0:d} format string?
0
 
LVL 8

Assisted Solution

by:Anurag Agarwal
Anurag Agarwal earned 250 total points
ID: 35007844
SELECT CONVERT(VARCHAR(10), GETDATE(), 101) AS startdate

--  [MM/DD/YYYY]  for date format for reference
0
 

Author Closing Comment

by:murbro
ID: 35008922
Thanks very much
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

22 Experts available now in Live!

Get 1:1 Help Now