Hi I am trying to convert a week which is entered in a text box on a form to the first day of the month in which it falls.
My text box (txtdw) is in the format yyww and I want it to be converted to 01/mm/yyyy.
example: 1401 would convert to 01/01/2014. 1406 would convert to 01/02/2014.
I am pretty close, I can get to the correct month but I can't work out how to change to the first day of the month.
My text box (txtdw) is in the format yyww and I want it to be converted to 01/mm/yyyy.
example: 1401 would convert to 01/01/2014. 1406 would convert to 01/02/2014.
I am pretty close, I can get to the correct month but I can't work out how to change to the first day of the month.
Code:
DateAdd("D", Right(Me.txtDW, 2) * 7, DateSerial("20" & Left(Me.txtDW, 2), 1, 1))