Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number of Mondays in a month
Message
From
20/10/2016 12:18:06
 
 
To
19/10/2016 20:31:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01642129
Message ID:
01642154
Views:
49
Close Data All
Set Date short
Set Date French    &&change to american

Create Cursor ycurs(xdate d,xmonth i,xday c(10))
Local Date0
Date0=Inputbox("Any date ?","",Trans(Date()) )
Date0=Ctod(Date0)


Local xm
xm=Ctod("01/01/"+Trans(Year(Date0)) )


For i=1 To 365   &&gather all dates of specified year of date typed
	Insert Into ycurs Values (xm+i,Month(xm+i),Cdow(xm+i))
Endfor


Sele ycurs
*Brow
Browse  For  xmonth=Month(Date0) And Allt(xday)=="lundi" Nowait &&change to monday
Count To nd  For xmonth=Month(Date0) And Allt(xday)=="lundi"
Messagebox ( "month "+Trans(Month(Date0))+"/"+Trans(Year(Date0))+" contains : "+Trans(nd)+" lundi  ",0+32+4096)
Use In "ycurs"

Retu
can extend to any day....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform