代码编写:
Dim Year as Integer
Dim Month as IntegerDim Day as Integer
Dim Dayofweek as Byte
Dim Birthday as Date
Year=Int(Val(Text1.Text))
Month=Int(Val(Text2.Text))
Day=Int(Val(Text3.Text))
Birthday=Dateserial(Year,Month,Day)
Dayofweek=Weekday(Birthday)
Label6.caption=Weekdayname(n)
End sub
Private Function Myweekdayname(Dayofweek as integer)as string
select case n
case 1
Myweekdayname=“星期天”
case 2
Myweekdayname="非星期天"
End select
End Function