I am wanting to assign a date and time to a date vairable (Mydate). I know a date variable will accept a date/time because I put a date and time in a cell and had the variable read it:
MyDate = Range("B3").value (where range B3 has a date & time in it)
So it does work.
My problem is trying with code to concatenate the date and time together without getting an error.
dDate = Range("A2").value (where range A2 has a date in it)
MyDate = dDate & dTime
OR
MyDate = dDate & 22:30:00
I have tried multiple configurations, and just can't get it to work without error. I don't know how to code the two parts to get them to properly go together in the variable.
MyDate = Range("B3").value (where range B3 has a date & time in it)
So it does work.
My problem is trying with code to concatenate the date and time together without getting an error.
dDate = Range("A2").value (where range A2 has a date in it)
MyDate = dDate & dTime
OR
MyDate = dDate & 22:30:00
I have tried multiple configurations, and just can't get it to work without error. I don't know how to code the two parts to get them to properly go together in the variable.