Is there a today() function in VBA?

I've been trying to get the current date a few ways in VBA. I tried using the today() function in a spreadsheet and getting the data from that cell and also calling it explicitly in a vba script and have had no success. any help will be appreciated.


Answer this question

Is there a today() function in VBA?

  • Rick Penner

    Offcourse. (^_^ ) The only difference between Now and the one's i've suggested is that Now contains both the current date and time while Date and Time are seperate commands for the date and time. (^_^ ) It all depends on which information you need.
  • Amir.S

    You can use "MyDate = Date()" for that. (^_^ ) If you want to the current time, use "MyTime = Time()"
  • Ggreg

    i use now() to enter the date for new entries into my database - i would assume that it also works for excel
  • Is there a today() function in VBA?