So the function =Now()....is there a way I can use this and only get the date, not the time?
or is there just a function for this idea?
thanks Justin
So the function =Now()....is there a way I can use this and only get the date, not the time?
or is there just a function for this idea?
thanks Justin
You could also use Format$(Now(), "Short Date") or whatever date format you want. Be aware, this function will return the Date as a string, so using Date() is a better approach.
Dates in VBA are just floating point numbers, where the integer part represents the date and the fraction part represents the time. So in addition to using the Date
function as tlayton says (to get the current date) you can also just a date value to a integer to get the date-part from an arbitrary date: Int(myDateValue)
.