Re: Y2K to_date SQL question

From: Ulf Magnusson <ulf.magnusson_at_briunix.kiedt.ericsson.se>
Date: Fri, 16 Oct 1998 14:04:08 +0200
Message-ID: <707c3q$4h6_at_newstoo.ericsson.se>


Hello

You can use the format 'RRMMDD' instead of 'YYMMDD'

/Ulf

Jim Pistrang wrote in message ...
>Y2K to_date SQL question
>
>Hi all,
>
>I've got some data that's fed in from an old system. There's a cancel
>date field named canyymmdd thats a 6 character field in yymmdd format. I
>convert it to a date field for most functions, but there's one place where
>I need to return the earliest date in a table using the yymmdd format.
>Before Y2K I could do this:
>
>select min(canyymmdd) from mytable;
>
>I was hoping I could get around Y2K by doing this, but it doesn't work:
>
>select min(to_date(canyymmdd,'YYMMDD')) from mytable
>
>I realize I could modify the database so the field is yyyymmdd, but I'd
>rather not! Is there a SQL command that will return the earliest yymmdd
>for me, taking into account the fact that 000101 is greater than 991230?
>
>tia
>
>Jim
Received on Fri Oct 16 1998 - 14:04:08 CEST

Original text of this message