Try this.
If currentDate.Day >= 1 And currentDate.Day <= 15 Then
Get the last date of the previous month
resultDate = New DateTime(currentDate.Year, currentDate.Month, 1).AddDays(-1)
Else
Use the current date
resultDate = currentDate
End If
Try this.
If currentDate.Day >= 1 And currentDate.Day <= 15 Then
Get the last date of the previous month
resultDate = New DateTime(currentDate.Year, currentDate.Month, 1).AddDays(-1)
Else
Use the current date
resultDate = currentDate
End If