Hi panic mode,
Really appriciate you help.. But it seems like some og the code i missing in your last post? or maybe i just dont get it......
It seems like there is a funktion missing for Get_Day_Name
And just to save time:
Log and mod what are they declared as.
Thanks in advance
This i what i have so far.
Code
DEF Weekday ( )
DECL CHAR t[10]
DECL DATE HistoricDay
;Shows todays day
Log(Get_Day_Name(Day_Of_The_Week()))
;Show Some Random Day
HistoricDay.YEAR = 1927
HistoricDay.MONTH = 9
HistoricDay.DAY = 24
Log(Get_Day_Name(Day_Of_The_Week(HistoricDay)))
END
DEFFCT INT DAY_OF_THE_WEEK(d:IN)
DECL DATE d
DECL CHAR t[12]
DECL INT n,m,y
t[]="032503514624"
IF VarState("d") <> #initialized THEN
d=$DATE
ENDIF
IF d.month < 3 THEN
y = d.year-1
ELSE
y = d.year
ENDIF
m=t[d.month]
m=m-48
n=y + y/4 -y/100 + y/400 + m + d.day
return mod(n,7)
ENDFCT
Display More