Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Last weekday of a month 1997-06-08 -- Robert Rogers !Text Equates
SundayText Equate('Sunday')
MondayText Equate('Monday')
TuesdayText Equate('Tuesday')
WednesdayText Equate('Wednesday')
ThursdayText Equate('Thursday')
FridayText Equate('Friday')
SaturdayText Equate('Saturday')
! Numeric Equates
Sunday Equate(1)
Monday Equate(2)
Tuesday Equate(3)
Wednesday Equate(4)
Thursday Equate(5)
Friday Equate(6)
Saturday Equate(7)
LastDayOfMonth Long
AnyDate Long
AnyDate = any given Clarion standard date
LastDayOfMonth = date(month(AnyDate) + 1,1,year(AnyDate)) -1
!Execute some code depening on day of week
Execute (LastDayOfMonth % 7) + 1
Do SundayRoutine
Do MondayRoutine
Do TuesdayRoutine
Do WednesdayRoutine
Do ThursdayRoutine
Do FridayRoutine
Do SaturdayRoutine
End
! or return a value to a variable
Execute (LastDayOfMonth % 7) + 1
?DayText = SundayText
?DayText = MondayText
?DayText = TuesdayText
?DayText = WednesdayText
?DayText = ThursdayText
?DayText = FridayText
?DayText = SaturdayText
End
Today is November 21, 2024, 7:43 am This article has been viewed 35204 times.
|
|