计算天数及月初月末日期
Function 本月天数(日期 As Date) As Byte
本月天数 = DateSerial(Year(日期), Month(日期) + 1, Day(日期)) - 日期
End Function
Function 月末(日期 As Date) As Date
月末 = DateSerial(Year(日期), Month(日期) + 1, 1) - 1
End Function
Function 月初(日期 As Date) As Date
月初 = 日期 - Day(日期) + 1
End Function
Access软件网交流QQ群(群号:198465573) |