The only problem is that the day of week will be wrong if you then extract a required date.
My solution was:-
Code: Select all
Procedure TexDay()
y = iyear ;Save the year (in case modified)
If y < 1970
y = y + 56 ;Adjust year if out of Unix range
EndIf
X = DayOfWeek(Date(Y,iMONTH,iDAY,0,0,0))
Select X
Case 0
aNS1 = "Sun"
Case 1
aNS1 = "Mon"
Case 2
aNS1 = "Tue"
Case 3
aNS1 = "Wed"
Case 4
aNS1 = "Thu"
Case 5
aNS1 = "Fri"
Case 6
aNS1 = "Sat"
EndSelect
EndProcedure
So that takes you to 1914 which should cater for most birthdays. Presumably adding 112 will cater for even older dates but you may need to test for number year range otherwise adding the 112 range to all dates might take you 'over the top' in the other direction!
Regards,
Ernest