Solved

DateTime Conversion

Posted on 2013-01-16
3
231 Views
Last Modified: 2013-01-16
How do I conver a DateTime date field to display only the date.
Example:
SELECT Customer,Invoice,InvoiceDate
From Invoices
Where
Customer = 123

Normal Results:
123    45678    2012-10-222 11:15:03:00

What I need
123    45678    2012-10-222
0
Comment
Question by:PhilChapmanJr
[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
3 Comments
 
LVL 25

Accepted Solution

by:
Lee Savidge earned 500 total points
ID: 38782430
SELECT Customer,Invoice,convert(nvarchar(10), InvoiceDate, 120) as InvoiceDate
From Invoices
Where
Customer = 123
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38782445
please read up this article:
http://www.experts-exchange.com/Database/Miscellaneous/A_1499-DATE-and-TIME-don%27t-be-scared-and-do-it-right-the-first-time.html
above comment is correct, in that regards...
I presume the 222 (day) is a typo
0
 
LVL 2

Author Closing Comment

by:PhilChapmanJr
ID: 38782487
Thanks
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

623 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