在db2中怎样计算每个月有多少天

我想知道某月共有多少天,该怎么办?有dayofmonth类的函数吗?
---------------------------------------------------------------

int intdays

TDateTime Udate,Ddate ;
Udate=StrToDate("2002-10-1") ;
Ddate=StrToDate("2002-11-1") ;
intdays=(int)Ddate-(int)Udate ;
这样算出来的是10月份的天数
你可以参考

Published At
Categories with 数据库类
comments powered by Disqus