Skip to content

Instantly share code, notes, and snippets.

@nmccready
Created September 26, 2014 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmccready/9e92242b043cfa17654c to your computer and use it in GitHub Desktop.
Save nmccready/9e92242b043cfa17654c to your computer and use it in GitHub Desktop.
working select case
select prior_sale_date,
CASE
WHEN prior_sale_date != '0'
then
to_date(prior_sale_date:: text,'YYYYMMDD')
ELSE
NULL
END AS date_formatted
from flc12021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment