Solved

ASP.net SQL table data types

Posted on 2011-03-01
6
282 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
[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
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 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

724 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