Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
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, 6:58 am This article has been viewed 35203 times.
|
|