🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.vbasic
Article #92255

Re: VB calendar - dzien tygodnia

#92255
From: Jarek Mielcarek
Date: Sat, 22 Oct 2005 07:09
30 lines
1669 bytes
Jarek Mielcarek napisał(a):
> Roszu napisał(a):
> 
>> Dzieki
>>
>> konkretnie mi chodzi o to zeby program zliczal mi dni robocze ( pon - 
>> pia )
>> od daty dziesiejszej ( systemowej ) do 1 dnia aktualnego miesiaca.. Moze
>> macie jakis pomysl na cos prostego a zarazem funkcjonalnego.
> 
> 
> mowisz i masz:
> 
> Dim i As Integer, licznik As Integer, dzien As Integer
> dzien=0
> For i = 0 To Day(Date) - 1
>     dzien = Weekday(DateAdd("d", i, CDate(Year(Date) & "-" & Month(Date) 
> & "-1")), 1)
>     If dzien = vbSunday Or dzien = vbSaturday Then
>         licznik = licznik + 1
>     End If
> Next i
> MsgBox licznik
> 
> jaro

oczywiscie warunek powinien wygladac tak:
  If dzien <> vbSunday Or dzien <> vbSaturday Then

jaro
Technical Details
Message-ID: <djcogi$mp5$1@news.onet.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mail
References: <dj7s7u$n42$1@news.onet.pl> <dja9td$t2n$1@news.onet.pl> <4358dd63$2@news.vogel.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mail
From: Jarek Mielcarek <kreskowy@brak.mi.go>
Newsgroups: pl.comp.lang.vbasic
Subject: Re: VB calendar - dzien tygodnia
Date: Sat, 22 Oct 2005 09:09:49 +0200
Organization: Onet.pl
Lines: 30
Message-ID: <djcogi$mp5$1@news.onet.pl>
References: <dj7s7u$n42$1@news.onet.pl> <dja9td$t2n$1@news.onet.pl> <4358dd63$2@news.vogel.pl>
NNTP-Posting-Host: dfc73.neoplus.adsl.tpnet.pl
Mime-Version: 1.0
X-Trace: news.onet.pl 1129964882 23333 83.23.132.73 (22 Oct 2005 07:08:02 GMT)
X-Complaints-To: usenet@news.onet.pl
NNTP-Posting-Date: Sat, 22 Oct 2005 07:08:02 +0000 (UTC)
X-Sender: h1JwesqQw6QzFTholBTlGMvvqTV9SizZ
In-Reply-To: <4358dd63$2@news.vogel.pl>
X-Accept-Language: pl, en-us, en
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit