Michael Maddison
michael at ddisolutions.com.au
Thu Jan 18 19:01:05 CST 2007
I think 3 is the correct style... convert(YourDate,varchar(15),3) However the question was how to store a 2 digit year which is a bit odd... However AFAIK you cant and keep the datetime datatype. You would need to store it as a string... <shudder> Sounds a like FE display issue to me not a db issue. cheers Michael M convert(YourDate,varchar(15),1) At 12:00 PM 1/18/2007, you wrote: >Date: Thu, 18 Jan 2007 12:01:54 +0100 (CET) >From: paul.hartland at fsmail.net >Subject: [dba-SQLServer] SQL Server - Make Date Field Display 2 Digit > Year Only >To: accessd <accessd at databaseadvisors.com>, dba-sqlserver > <dba-sqlserver at databaseadvisors.com> >Message-ID: > ><20389518.198761169118114607.JavaMail.www at wwinf3004.me-wanadoo.net> >Content-Type: text/plain; charset=UTF-8 > >To all, > >I have a date field in a table in SQL Server 2000, which displays the >date as DD/MM/YYYY. Does anyone know how to make the date field just >hold a 2 digit year DD/MM/YY ? > >Thanks in advance for any help on this. > > >Paul Hartland >paul.hartland at fsmail.net >07730 523179 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com