How do I convert INTEGER to DATE in 6.3.2?
I have a table 'mytbl' with a column 'd' which is
an integer, containing dates in YYMMDD form. Now,
how do I convert these integer dates to date dates?
I tried...
ALTER TABLE mytbl ADD COLUMN dd date;
UPDATE mytbl SET dd=date(d+1900);
...but there is no int-to-date function!
UPDATE mytbl SET dd=((d+1900)::unknown)::date;
...does not work either. No int-to-unknown function!
So, how do I cast to type unknown?
I have ... let's see... around 500-600 days
to solve this problem ;)
/* m */