VB6: How to remove the Time part from Date type -


i have date variable contains time:

dim dt date dt = "8/3/2016 7:10:40 am" 

--> remove somehow time result should be:

dt = "8/3/2016" 

my question how remove time?

thanks

for date type variable:

dt = datevalue(dt) 

or

dt = cdate(int(dt)) 

or string:

strdt = format$(dt, "m/d/yyyy") 

Comments