[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

ASP.net SQL table data types

Posted on 2011-03-01
6
Medium Priority
?
288 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:Murray Brown
[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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Accepted Solution

by:
DJFuller earned 1000 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 1000 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:Murray Brown
ID: 35008922
Thanks very much
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

656 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