ISDATEFIRST

Returns whether a date is the first of a week, month or year.


REMARKS



ISDATEFIRST_OFAWEEK

Returns whether a date is the first day of the week.



ISDATEFIRST_OFAMONTH

Returns whether a date is the first day of the month.

Public Function ISDATEFIRST_OFAMONTH( _ 
Optional ByVal dtDateValue As Date) As Boolean

Dim iDay As Integer
    Application.Volatile
    
    If VBA.IsMissing(dtDateValue) Then
        dtDateValue = VBA.Date
    End If
    
    iDay = VBA.Day(dtDateValue)
    If (iDay = 1) Then ISDATEFIRST_OFAMONTH = True
    If (iDay > 1) Then ISDATEFIRST_OFAMONTH = False
End Function

ISDATEFIRST_OFAYEAR

Returns whether a date is the first day of a year.


For instructions on how to add these functions to a workbook refer to the page under Inserting Functions


© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext