I have a Date
variable which contains also the time:
Dim dt As Date
dt = "8/3/2016 7:10:40 AM"
--> remove somehow the time so the result should be:
dt = "8/3/2016"
How to remove the time?
For another Date type variable:
dt = DateValue(dt)
or
dt = CDate(Int(dt))
Or for a string:
strdt = format$(dt, "m/d/yyyy")