【自作関数】月初の日付を取得

Posted by: okap1104 - Posted on:

引数で渡した日付から月初日を取得する。

Public Function cmnfunc_getBeginOfMonth(ByVal datDate As Date) As Date
    cmn_getStartOfMonth = DateSerial(Year(datDate), Month(datDate), 1)
End Function