[dba-SQLServer] Date field type

Susan Geller sgeller at cce.umn.edu
Wed Jul 14 14:22:10 CDT 2004


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





More information about the dba-SQLServer mailing list