Snowflake68
Registered User.
- Local time
- Today, 14:36
- Joined
- May 28, 2014
- Messages
- 464
I have a sales table with one of the fields is an invoice date. I need to run a query that will find the 30th of every month in the invoice date field.
I have a function that will find the first day of the month but cannot find anything that will find a specific day of every month.
This is my function for the first day of the month so not sure if I can use this to help with my solution or not.
Hope someone can help.
I have a function that will find the first day of the month but cannot find anything that will find a specific day of every month.
This is my function for the first day of the month so not sure if I can use this to help with my solution or not.
Code:
Public Function FirstDayInMonth(Optional dtmDate As Variant) As Date
If IsMissing(dtmDate) Then
dtmDate = Date
End If
FirstDayInMonth = DateSerial( _
Year(dtmDate), Month(dtmDate), 1)
End Function
Hope someone can help.