EXPERT RESPONSE
Well, you will need to use CURRENT DATE along with some DB2 functions and some additional logic. First of all, the following functions will return the day, month, and year component of a date:
DAY(CURRENT DATE)
MONTH(CURRENT DATE)
YEAR(CURRENT DATE)
So, for today, the first would return 12, the second 5, and the last 2003. To get that into your format you would have to do something like this:
YOUR_FORMAT_DATE = ((YEAR(CURRENT DATE) - 2000) * 10000) +
(MONTH(CURRENT DATE) * 100) +
DAY(CURRENT DATE)
That should return the date in the numeric format you want (at least until the year 2100). But you'd be much better off using DB2 dates in your tables!
|