Reputation: 1520
Can some one help me to fix this error ..Not able declare a datetime
Upvotes: 0
Views: 1787
Reputation: 56982
You have to declare DateTime
with its full NameSpace
as System.DateTime
. This is because your application NameSpace
is also Datetime
and is the default. VB is not case sensitive so when you declare Datetime it refers to your application NameSpace
.
Upvotes: 2
Reputation: 3131
Change Datetime
to DateTime
.
And you are getting DateTime
converted as Datetime
coz your project's name is Datetime, so your immediate class name or namespace would also be Datetime. Change your class name or else use Date or else use fully qualified name for DateTime
.
Upvotes: 5
Reputation: 155075
The .NET type name is DateTime
(not the capital 'T', VB is case-sensitive about type names).
VB.NET has a type alias called Date
(which is not case sensitive).
However Datetime
is not valid, so just correct it to DateTime
Upvotes: 0