| Author |
Topic  |
|
|
CRWilliams
Starting Member
2 Posts |
Posted - 07/13/2012 : 17:56:57
|
My query looks like this
SELECT ErrorsTable.DateOfError FROM ErrorsTable WHERE (((ErrorsTable.ResolutionFlag)=False) AND ((BIPSErrors.User)="CRWilliams"));
Which returns a single column of dates like this: 7/11/2012 8:07:16 AM 7/11/2012 2:58:42 PM 7/13/2012 1:13:16 PM 7/13/2012 1:13:24 PM
However, I would like the column to look like this: 7/11/2012 7/11/2012 7/13/2012 7/13/2012
I can't figure out how to remove the time from my dates. Thanks in advance to anyone who can help. |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
|
|
CRWilliams
Starting Member
2 Posts |
Posted - 07/13/2012 : 18:05:16
|
quote: Originally posted by tkizer
You can use the CONVERT function with the appropriate style, I believe 101.
But this is not a problem for SQL. You should be doing this formatting in your application. Let SQL return raw data. Format it in your application code.
Tara Kizer Microsoft MVP for Windows Server System - SQL Server http://weblogs.sqlteam.com/tarad/
Subscribe to my blog
I forgot to include one other piece of information in my original post. I also want to get distinct values. So I actually need the list to look like
7/11/2012 7/13/2012
I'm just using these numbers to populate a listbox and I think It would make my code a lot cleaner to not have to filter the results from the query.
How would I use the convert function?
|
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47040 Posts |
|
| |
Topic  |
|