Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Now() function with time trim

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?

like image 827
Justin Avatar asked Jun 24 '10 01:06

Justin


2 Answers

There is a Date function.

like image 170
tlayton Avatar answered Sep 30 '22 13:09

tlayton


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 cast a date value to a integer to get the date-part from an arbitrary date: Int(myDateValue).

like image 20
Dean Harding Avatar answered Sep 30 '22 13:09

Dean Harding