Hello
How can i get 1st day of the month and last day of the month in respective textboxes
with the below code
txtFirstDay.Text should display as "01-06-2018"
txtlastDay.Text should display as "30-06-2018"
Thanks
SamDsouza
How can i get 1st day of the month and last day of the month in respective textboxes
with the below code
Code:
Option Explicit
Public gDate As Date, ldate As Date, lastDay As Long
Private Sub cmdGetFirstLastDay_Click()
Dim yearNo As Integer, monthNo As Integer, dayNo As Integer
yearNo = "2018"
monthNo = "6"
dayNo = "24"
gDate = DateSerial(yearNo, monthNo, dayNo)
End Sub
txtFirstDay.Text should display as "01-06-2018"
txtlastDay.Text should display as "30-06-2018"
Thanks
SamDsouza
Last edited: