![]() |
| |||||||
| Sponsored Links |
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| hi, I have a field called dateadded field type is datetime the values in them are like this 7/3/2008 11:26:51 AM 7/3/2008 3:42:45 AM 7/2/2008 1:57:18 PM 6/30/2008 2:37:27 AM I want to findout distinct dates in this field so when i display them they should be 7/3/2008 7/2/2008 6/30/2008 i have my query like this Select Distinct(DateAdded) from employee; Select Distinct(DateAdded) from employee ORDER BY Convert(datetime,DateAdded); i tried these 2 queries it didnt work can someone tell me what i am doing wrong todd |
| Sponsored Links |
|
#2
| ||||
| ||||
| Are you using ASP? If so, just use the FormatDateTime() function to display them. Otherwise, give us some more info such as the technology used (ASP, PHP, ASP.net) and the database (Access, MS SQL, MySQL).
__________________ jmurrayhead If you agree with me... click the icon! If my post solved your problem, click the button in the lower right-hand corner of the post.Join our Folding team: DeveloperBarn Folding |
|
#3
| ||||
| ||||
| Try, select convert(varchar,DateAdded,101) from employee For mm/dd/yy
__________________ If i helped you, make me famous by clicking the |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| date problem | todd2006 | SQL Development | 1 | May 12th, 2008 01:51 PM |