So i have this;
I get null for fields with a zero in the stsdat.
If i use
Then i at least get 1940.
any thoughts. My field i am dumping into is not null capable.
Code:
select strnum,
Case When a.stsdat <> 0 then
Cast (
VarChar_Format(Timestamp_Format(Char(
((a.stscen + 19 ) * 1000000 ) + a.stsdat),
'YYYYMMDD'), 'YYYY-MM-DD')
as Date)
else
Cast ('0001-01-01' as date) end "Date Opened"
from tblstr a
If i use
Code:
select strnum,
Case When a.stsdat <> 0 then
Cast (
VarChar_Format(Timestamp_Format(Char(
((a.stscen + 19 ) * 1000000 ) + a.stsdat),
'YYYYMMDD'), 'YYYY-MM-DD')
as Date)
else
Cast ('1940-01-01' as date) end "Date Opened"
from tblstr a
any thoughts. My field i am dumping into is not null capable.





Comment