Mackin, Christopher
CMackin at Quiznos.com
Wed Jul 14 14:54:24 CDT 2004
If you do all your formatting on the report or form that your users use you can avoid that problem. Alternatively, add another field that has the real date in it and sort by that. -Chris Mackin -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Susan Geller Sent: Wednesday, July 14, 2004 1:22 PM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer] Date field type In my sql server 2000 table, I have a date field. When I display that field in a query it displays as yyyy-mm-dd and then a timestamp. I want dd/mm/yyyy and no time. I converted it using this syntax convert(varchar, milestone_dt, 101) and I get what I want, EXCEPT, when I try to sort by that field, it sorts as a varchar, not as a date, so I have all my January's together instead of all my 2004's together. Can I have this format and still keep it as a date field so it will sort correctly? --Susan Susan B. Geller Office of Information Systems College of Continuing Education University of Minnesota 306 Wesbrook Hall 77 Pleasant Street SE Minneapolis, MN 55455 Phone: 612-626-4785 Fax: 612-625-2568 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com