请问该如何取每月的总天数,该用什么函数???

gy123_79 2002-01-16 03:36:01
...全文
143 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
946 2002-01-16
  • 打赏
  • 举报
回复
求本月初、月末,上月初、月末,下月初、月末,最终解答
datetime ldt_nowdatetime

ldt_nowdatetime = datetime(today(), now())
messagebox("本月初", string(datetime(date(string(date(ldt_nowdatetime), 'yyyy-mm-01'))), 'yyyy-mm-dd hh:mm:ss'))
messagebox("本月末", string(datetime(RelativeDate(date(string(RelativeDate(date(string(date(ldt_nowdatetime), 'yyyy-mm-25')), 10), 'yyyy-mm-01')), -1)), 'yyyy-mm-dd hh:mm:ss'))
messagebox("上月初", string(datetime(date(string(RelativeDate(date(string(date(ldt_nowdatetime), 'yyyy-mm-01')), -1), 'yyyy-mm-01'))), 'yyyy-mm-dd hh:mm:ss'))
messagebox("上月末", string(datetime(RelativeDate(date(string(date(ldt_nowdatetime), 'yyyy-mm-01')), -1)), 'yyyy-mm-dd hh:mm:ss'))
messagebox("下月初", string(datetime(date(string(RelativeDate(date(string(date(ldt_nowdatetime), 'yyyy-mm-25')), 10), 'yyyy-mm-01'))), 'yyyy-mm-dd hh:mm:ss'))
messagebox("下月末", string(datetime(RelativeDate(date(string(RelativeDate(date(string(date(string(RelativeDate(date(string(date(ldt_nowdatetime), 'yyyy-mm-25')), 10), 'yyyy-mm-01')), 'yyyy-mm-25')), 10), 'yyyy-mm-01')), -1)), 'yyyy-mm-dd hh:mm:ss'))
fallstone 2002-01-16
  • 打赏
  • 举报
回复
每个月的天数不是一定的么?干吗还要取?

401

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 非技术版
社区管理员
  • 非技术版社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧