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

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
 
P

Peter Duniho

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
 
C

Cowboy \(Gregory A. Beamer\)

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!
************************************************
 
G

Guest

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!
************************************************
 
C

Cowboy \(Gregory A. Beamer\)

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!
 

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

Top