|
-
May 12th, 2006, 06:12 AM
#1
Thread Starter
Fanatic Member
SQL Server 2000 Order By Date
Hi,
I'm using SQL Server 2000 and am having a bit of trouble sorting by date
I've been getting incorrect results till I started converting the date to
YYYYMMDD - ORDER BY CONVERT(CHAR(8),a.Date_Assigned,112) DESC
The above is great if multiple records aren't inserted a day.
Does anyone know the code to convert a date to YYYYMMDDHHMMSS?
Cheers Al
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|