hi..I'm just a newbie programmer who needs some help. I'm trying to enter a date and save it in a mysql database. however the format in mysql is yyyy-mm-dd and the format in vb.net is mm-dd-yyyy. how can i format the date in vb in order to successfully enter it in the database?
ive tried using this code
dim mydate as string mydate = now.year & "-" & now.month & "-".now.day
and it works but the problem is I'm trying to use the date in order to get the difference
between two given months using the DateDiff function but it wont accept it since the variable mydate is a string and not a date type
how can I fix this problem? thanks