Variations of this have been asked and answered here a few times, but I guess I still don't get it...
I understand that if I use a 2-digit year, then the valid date range is 1940 - 2039. But I thought if I use a 4-digit year (YYYYMMDD), then I should be able to have all years. However, this isn't what I'm seeing...
Why does this work:
But this does not (I just get the +++++++ )
I'm supplying all 4 digits of the year, so why the 1939/1940 cutoff...?
Btw, my goal is to find invalid birth dates in our database that need to be corrected (they're stored as separate numeric fields CC, YY, MM, and DD), but old people with valid birth dates are being returned.
I understand that if I use a 2-digit year, then the valid date range is 1940 - 2039. But I thought if I use a 4-digit year (YYYYMMDD), then I should be able to have all years. However, this isn't what I'm seeing...
Why does this work:
Code:
[SIZE=14px][FONT=courier new]select date(timestamp_format('19400630','YYYYMMDD')) from sysibm/sysdummy1[/FONT][/SIZE]
Code:
[SIZE=14px][FONT=courier new]select date(timestamp_format('19390630','YYYYMMDD')) from sysibm/sysdummy1[/FONT][/SIZE]
Btw, my goal is to find invalid birth dates in our database that need to be corrected (they're stored as separate numeric fields CC, YY, MM, and DD), but old people with valid birth dates are being returned.
Comment