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 |
|
westlondonsun
Starting Member
1 Post |
Posted - 2005-10-14 : 07:49:43
|
| hion my dynamic webpage i am calling in the content of one of my sql tables. in the table is a field called expenses_date. this is in the format of dd/mm/yyyy, i do a SOrder by Desc expenses_Date. the dates are returned onto the webpage in dd desc date and not the full date, so eg11/05/200515/06/200518/04/200520/09/2004this shows me that it is looking at only the dd part of the date and putting that into order. it should be like the following15/06/200511/05/200518/04/200520/09/2004Any ideas? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-10-14 : 07:53:19
|
| What is the datatype of expenses_Date?If it is DateTime column then there wont be any problem in sortingOtherwise you need to sort it by converting it into DateTimeSelect columns from yourTable Order by Convert(DateTime,expenses_Date) DescMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|