integer or string?

1. Junior Member
Join Date
Dec 1969
Posts
25

## integer or string?

The name of the month (=maand) isn&#039;t shown, but the Case Else ("maand") is. I can&#039;t figure out why. Where do I go wrong?<BR><BR>==================<BR>nu = Request.Querystring("datebox1")<BR>dagendezemaand = cInt(NumberOfDays(DatePart("m",nu), DatePart("yyyy", nu)))<BR><BR>Function maand(tablemaand)<BR> Select Case maand<BR> case 1 maand = "januari"<BR> case 2 maand = "februari"<BR> case 3 maand = "maart"<BR> case 4 maand = "april"<BR> case 5 maand = "mei"<BR> case 6 maand = "juni"<BR> case 7 maand = "juli"<BR> case 8 maand = "augustus"<BR> case 9 maand = "september"<BR> case 10 maand = "oktober"<BR> case 11 maand = "november"<BR> case 12 maand = "december"<BR> case else maand = "maand"<BR> END Select<BR>End Function<BR><BR>Response.Write "&#060;tr&#062;&#060;td&#062;" & maand(DatePart("m",nu)) & "&#060;/td&#062;"<BR> counter = 1<BR>Do WHILE counter &#060;= dagendezemaand<BR> Response.Write "&#060;td&#062;" & counter & "&#060;/td&#062;"<BR> counter = counter + 1<BR>LOOP<BR>

2. Senior Member
Join Date
Dec 1969
Posts
1,285

## hmmm

are you sure you&#039;re getting an integer from 1 to 12 when you do DatePart("m",nu)?<BR><BR>try doing the following in order to check what value you&#039;re actually passing to the function:<BR><BR>response.write DatePart("m",nu)

3. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

Function maand(tablemaand)<BR>Select Case maand<BR>case 1 maand = "januari"<BR>case 2 maand = "februari"<BR>case 3 maand = "maart"<BR>case 4 maand = "april"<BR>case 5 maand = "mei"<BR>case 6 maand = "juni"<BR>case 7 maand = "juli"<BR>case 8 maand = "augustus"<BR>case 9 maand = "september"<BR>case 10 maand = "oktober"<BR>case 11 maand = "november"<BR>case 12 maand = "december"<BR>case else maand = "maand"<BR>END Select<BR>End Function<BR><BR><BR>the variable you "seem" to want to check for is tablemaand but you case statement is checking for maand...*** is maand?? isnt it a name of a function<BR><BR>try this<BR>Select Case clng(tablemaand) instead.<BR><BR>

4. Junior Member
Join Date
Dec 1969
Posts
25