现在我就在工作中遇到的日期运算的方法的通过示例来描述,希望对学习db2的人有帮助。
eg:
declare jsrq date ;
if jsrq >current date then
set jsrq=current date;
else
set jsrq=jsrq -1 year +2 month -1 day ;
end if ;
上述示例很明白的描述了日期的运算
现在我就在工作中遇到的日期运算的方法的通过示例来描述,希望对学习db2的人有帮助。
eg:
declare jsrq date ;
if jsrq >current date then
set jsrq=current date;
else
set jsrq=jsrq -1 year +2 month -1 day ;
end if ;
上述示例很明白的描述了日期的运算