I am not sure why you would do that...If you want a date object with the current date in it, you should be able to use (note: I am not using Today as my variable name as this creates unclear code in my opinion because of reserverd/system keywords in various code languages):
Dim CurrentDate As Date = DateTime.Today
or
Dim CurrentDate As Date = DateTime.Now '(with current time included)
If you want to build the date with a DateSerial, I recommend you use something like:
Dim CurrentDate As Date = DateSerial(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day)
This format is more in line with best practices and .Net framework usage.
=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)
Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
C#.NET Programmer
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.