I want to a convert a month written like , 31/01/2025 into a number example = 1 etc , is there a function that I can use at MS Access Query level
I tried this below its not doing what I want:
I tried this below its not doing what I want:
Code:
Private Function GetMonthNumber(pstrMonthName As String) As Integer
Dim i As Long
For i = 1 To 12
If pstrMonthName = MonthName(i) Then
GetMonthNumber = i
Exit Function
End If
Next
End Function