Solved

ASP.net SQL table data types

Posted on 2011-03-01
6
259 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

776 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