Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: date question

Re: date question

From: Jim Kennedy <jim>
Date: Sun, 2 Jul 2006 20:26:24 -0700
Message-ID: <OLKdnQmKV_QoEDXZnZ2dnUVZ_vqdnZ2d@comcast.com>

<vijay_dwi_at_yahoo.com> wrote in message
news:1151895143.858830.240330_at_m79g2000cwm.googlegroups.com...
> Hi,
>
> I have a string in the format ('MM/DD/YYYY)
> examples('12/12/2006') or ('2/12/2006') or ('12/1/2006') or
> ('1/1/2006') .
> Have to to take the date and lpad it with ZERO if its a single digit.
>
> Can you please let me know the sql ?
>
> thanks.
>

Dates are dates and dates are not strings. You can format a date to a string representation.
to_char(sysdate,'mm/dd/yyyy')
or character to date to_date('2/12/2006','mm/dd/yyyy')

Jim Received on Sun Jul 02 2006 - 22:26:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US