To control a calendar i have to get the week of a year to use it in a for-loop. So I wrote this:
<font class="small">Code:</font><hr /><pre>
[ ] dtDayAndTime = GetDateTime ()
[ ] sDateStamp = FormatDateTime (dtDayAndTime, "ww")
[ ] iWeek = [INTEGER]sDateStamp
[-] for iWeekCount = 1 to iWeek step 1
[ ] etc....
But it counts until week 52 and not to 46 as it is today...
If i insert some Print-functions I get this:
sDateStamp = 46 (that's correct!)
iWeek = 52 (not what I want!)
The error occours in the typecast iWeek = [INTEGER]sDateStamp
Is there a possibility the get the right value for my variables?
Thank you in advance!
-----BEGIN GEEK CODE BLOCK-----
GIT d- s-:- a-- C++ U++ P+ L++
E--- W+++ N w O- PS+ PE- PGP+
t-- R tv+ b+++ DI++++ D+ G++ e*
------END GEEK CODE BLOCK------
iWeek = val(sDateStamp)
Thank you... life can be soooo easy. ^^
That's a point to be added in the SILK help! If you search for "cast" oder "type cast", you'll find nothing pointing to the val function...