> > WScript.Echo cdbl(#11/9/2001#) + 1
>
> dies bringt die Sache schon etwas n�her, wobei die Ausgabe f�r
>
> <[EMAIL PROTECTED]"VBSCRIPT" CODEPAGE="1252"%>
> <% a = "37204"
> this = DatePart("d", a-1) & "." & DatePart("m", a-1) & "." &
> (DatePart("yyyy", a-1) +1)
> Response.write this & "<br>"
> atag = day(this)
> amonth = month(this)
> ayear = year(this)
> alles = "#" & amonth & "/" & atag & "/" & ayear & "#"
> 'Response.write cdbl(#11/8/2002#)
> Response.write cdbl(alles)
> %>
>
> ergibt
>
> 8.11.2002
> 37568

Zum Jahr des vorigen Tages von a wird 1 addiert.

> setze ich aber die Variable ein, kommt ein Kompilierungsfehler.

Ja, weil alles ein String ist (vartype(alles) = 8).
cdbl(eval(alles)) w�rde funktionieren.
#11/8/2002# ist ein Datumsliteral, kein String.


Wozu braucht man denn diese seltsame Berechnung?

--
Alex

_______________________________________________
Coffeehouse mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/coffeehouse

Antwort per Email an