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
 
Top