我需要你的帮助.我想得到这个月的最后一天.这是我的代码,但如果我想调试它并将其编译到数据库,它说它在语法中有错误.请帮忙=)
Public Function GetNowLast() As Date
Dim asdfh As Date
asdfh = DateValue("1." _
& IIf(Month(Date) + 1) > 12, Month(Date) + 1 - 12, Month(Date) + 1) _
&"."&IIf(Month(Date)+1)>12 , Year(Date)+1,Year(Date))
asdf = DateAdd("d", -1, asdf)
GetNowLast = asdf
End Function
Run Code Online (Sandbox Code Playgroud) vba ×1