IS NULL - Mailing list pgsql-novice

From David Link
Subject IS NULL
Date
Msg-id 3BE83155.CDA2A866@soundscan.com
Whole thread Raw
Responses Re: IS NULL
List pgsql-novice
How to check a column value for IS NULL?

I would like to format a string as a date iff it is not null:

This frag returns a bogus date when column value is null:

  to_char(to_date (theatre_reldate, 'DDMMYYYY'), 'DD Mon YYYY')

So I'm looking for something of this sort:

 (case when not is null (t.theatre_reldate) then
    to_char(to_date (theatre_reldate, 'DDMMYYYY'), 'DD Mon YYYY')
    end) as theatre_reldate

thanks, david

pgsql-novice by date:

Previous
From: John Burski
Date:
Subject: Re: Casting problem
Next
From: Juan Jose Natera Abreu
Date:
Subject: Workaround or user defined type