Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
CRWilliams
Starting Member
2 Posts |
Posted - 2012-07-13 : 17:56:57
|
| My query looks like this SELECT ErrorsTable.DateOfErrorFROM ErrorsTableWHERE (((ErrorsTable.ResolutionFlag)=False) AND ((BIPSErrors.User)="CRWilliams"));Which returns a single column of dates like this:7/11/2012 8:07:16 AM7/11/2012 2:58:42 PM7/13/2012 1:13:16 PM7/13/2012 1:13:24 PMHowever, I would like the column to look like this:7/11/20127/11/20127/13/20127/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
38200 Posts |
|
|
CRWilliams
Starting Member
2 Posts |
Posted - 2012-07-13 : 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 KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://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 like7/11/20127/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
52326 Posts |
|
|
|
|
|