'Month' is a type and canot be used as an expression

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

any idea what causes this error??
Month is a function, currently used in applications,......

fyi, I'm using Vista bussines + VS2005 pro
 
any idea what causes this error??
Month is a function, currently used in applications,......

Maybe if you actually post some code that shows how you are getting the
error, someone could help.

Either there's a difference in how "Month" is defined in the context in
which you're getting the error, or you have a syntax error in which you're
using the identifier "Month". But it's not possible to be any more
specific than that without some concrete example of what you're talking
about.

Pete
 
You ahve something like this:

int month = DateTime.New.Month();

You should have

int month = DateTime.New.Month;

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
 
Dear,
please find the small code snippet which causes the error,......


Dim x As Integer
x = Month(Now)

thanks for your quick response!

--
Best regards
Luc
Cowboy (Gregory A. Beamer) said:
You ahve something like this:

int month = DateTime.New.Month();

You should have

int month = DateTime.New.Month;

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
 
Dim x as Integer = DateTime.Now.Month

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
Luc said:
Dear,
please find the small code snippet which causes the error,......


Dim x As Integer
x = Month(Now)

thanks for your quick response!
 
Back
Top