获取上月第一天

获取上月第一天

//====================================================================
// 函数: f_last_month
//--------------------------------------------------------------------
// 描述: 获取上月第一天
//--------------------------------------------------------------------
// 参数:
//  datetime ad_date 
//--------------------------------------------------------------------
// 返回值:  datetime
//--------------------------------------------------------------------
// 作者: xx 日期: 2006.07.25
//--------------------------------------------------------------------
// 修改历史:
// 
//====================================================================


Int li_year,li_month
DateTime ld_date
li_year = Integer(String(ad_date,'yyyy'))
li_month = Integer(String(ad_date,'mm'))

If li_month = 1 Then
 li_year = li_year -1
 li_month = 12
Else
 li_month = li_month -1
End If
ld_date = DateTime(Date(String(li_year,'0000')+'/'+String(li_month,'00')+'/01'),Time('00:00:00'))
Return ld_date


 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值