Date function?

R

Roger Brulotte

What is the day(),month() and year() fonction in vba?

example:

Dim mydate as date
mydate = 12-15-2001

If I want the month, what I sould do?

mymonth = mydate.month(mydate) does not match??

Does somebody have a trick?

Thanks

Alex
 
T

Tushar Mehta

Did you look up help in VBE? Specifically, search for 'month function'
(w/o the quotes). The topic includes an example that is close to your
example with a twist that makes it work correctly. ;-)

--
Regards,

Tushar Mehta
MS MVP Excel 2000-2004
www.tushar-mehta.com
Excel, PowerPoint, and VBA tutorials and add-ins
Custom Productivity Solutions leveraging MS Office
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Month problem 4
datepart function 3
Setting BaselineSavedDate 0
Using TEXT function in VBA 8
DateAdd and Date Format at once 6
Convert Julian to Date 1
Is there a faster way 15
Julian Date conversion 9

Top