abc
abc

Reputation: 45

MONTH IN MS ACCESS

When executing the code , Datatype mismatch Error is showing .Can tell if i need only Month(either as January,February.. or as 1 ,2,...12) as a field in MS Access database what should i give as data type.

Thanks for your answer.One more query:

if (rs6("TotalDays")+ tdays) > rs5("Sing") then

Is there any syntax error in this statement..?

tdays holds the number.

Upvotes: 0

Views: 97

Answers (1)

Tomas Aschan
Tomas Aschan

Reputation: 60584

Month() in access takes a parameter of type DateTime and returns the number of the month. To get the month name, you could either do FormatDate(Month(yourDate), 'mmmm') or MontName(yourDate) (in Access 2000 and later).

See here for more info.

Upvotes: 1

Related Questions