Week number

volvomann

Active Member
Licensed User
Longtime User
Hello!
Is there any possibility to get the week number from date time or anything else, if possible, how can I do it. Helsing volvoman
 

specci48

Well-Known Member
Licensed User
Longtime User
Just add
B4X:
Dim diff As Int
before the select statement and the red color is gone... ;)

I'm still using B4A 1.7 (because of the possibility to include the debug informationen without debugger) and this version does not mark an undeclared variable, so I didn't see the problem on my IDE.


specci48
 
Upvote 0

volvomann

Active Member
Licensed User
Longtime User
Can enyone tell me why this sub dont count this week, Same week number as last week neext count but one week short.
 
Upvote 0

specci48

Well-Known Member
Licensed User
Longtime User
Both variants, my inconvenient long solution and the convenient short solution with the AHLocale library form corwin42 provide the same result for the german locale.

If you use both codes within another locale, the long solution maybe incorrect, but the AHLocale library should work (see attached sample).


specci48
 

Attachments

  • week.zip
    6.7 KB · Views: 237
Upvote 0

volvomann

Active Member
Licensed User
Longtime User
Both variants, my inconvenient long solution and the convenient short solution with the AHLocale library form corwin42 provide the same result for the german locale.

If you use both codes within another locale, the long solution maybe incorrect, but the AHLocale library should work (see attached sample).


specci48

Thak you i tied this
 
Upvote 0
Top