I have the following code where I am trying to get the first of the previous month. the variable StrtDt keeps coming up as 1/9/1990???
Dim BillDt As Integer
Dim CurDt As Integer
Dim StrtDt As Date
Dim EndDt As Date
CurDt = Format(Date, "dd")
If CurDt >= 16 And CurDt <= 31 Then
BillDt = 1
End If
StrtDt = Date
If BillDt = 1 Then
StrtDt = Format(StrtDt, "mm") - 1
StrtDt = StrtDt & "/1/" & Format(Date, "yyyy")
End If