This function removes the time information from a specified date, leaving only the month, day, and year.
DateValue(date)
Returns a Variant of subtype Date.
DateValue returns 0 (12:00 AM) if date includes only time information. A type mismatch error occurs if date includes invalid date or time information, such as 89:98.
If date is a string that includes only numbers separated by valid date separators, DateValue recognizes the order for month, day, and year according to the short date format you specified for your system. DateValue also recognizes unambiguous dates that contain month names, either in long or abbreviated form. For example, in addition to recognizing 12/30/1991 and 12/30/91, DateValue also recognizes December 30, 1991 and Dec 30, 1991.
If the year part of date is omitted, DateValue uses the current year from the system date of your computer.