Re: date format not recognized

From: <muhammaddzulkarnain_at_gmail.com>
Date: Wed, 22 Oct 2008 23:37:54 -0700 (PDT)
Message-ID: <690f5451-378f-473d-afa9-87676ea6d76c@75g2000hso.googlegroups.com>


On Oct 23, 1:49 pm, Peter Nilsson <ai..._at_acay.com.au> wrote:
> muhammaddzulkarn..._at_gmail.com wrote:
> > hello everyone,
>
> > i just got a problem. This is my statement:
>
> > select hostname, to_char(to_date(&date_start ,
> > 'YYYYMMDD' || to_date(&date_end, 'YYYYMMDD')), 'YYYY')
> > from gen_api_performance_daily where statistics_date
> > between to_date(&date_start, 'YYYYMMDD') and
> > to_date(&date_end , 'YYYYMMDD')
>
> > when i executed the script, i got date format not
> > recognized error. how to solve it?
>
> Solve it? Who knows! But it's pretty obvious why
> you're getting the error...
>
>   to_char
>   (
>     to_date
>     (
>       &date_start,
>       'YYYYMMDD' || to_date(&date_end, 'YYYYMMDD')
>     ),
>     'YYYY'
>   )
>
> What do you think that || will produce?
>
> --
> Peter

it was wrong to put || in date function.. my objective actually is to combine &date_start and &date_end into date function. i do not know to do it Received on Thu Oct 23 2008 - 01:37:54 CDT

Original text of this message