获取上月第一天 //====================================================================// 函数: f_last_month//--------------------------------------------------------------------// 描述: 获取上月第一天//--------------------------------------------------------------------// 参数:// datetime ad_date //--------------------------------------------------------------------// 返回值: datetime//--------------------------------------------------------------------// 作者: xx 日期: 2006.07.25//--------------------------------------------------------------------// 修改历史: // //==================================================================== Int li_year,li_monthDateTime ld_dateli_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 = 12Else li_month = li_month -1End Ifld_date = DateTime(Date(String(li_year,'0000')+'/'+String(li_month,'00')+'/01'),Time('00:00:00'))Return ld_date