首先建一函式,進行星期數字與英文的轉換
private function english_WeekDay(num as Integer) as string()
select case num
case 1
english_WeekDay="Sunday"
case 2
english_WeekDay="Monday"
case 3
english_WeekDay="Tuesday"
case 4
english_WeekDay="Wednesday"
case 5
english_WeekDay="Thursday"
case 6
english_WeekDay="Friday"
case 7
english_WeekDay="Saturday"
end select
end function
private sub cmdShow_Click()
label1.caption=english_WeekDay(weekday(date))
end sub
這是目前我能想到的方法,不知道還有沒有更直接的方法或函數了。
首先建一函式,進行星期數字與英文的轉換
private function english_WeekDay(num as Integer) as string()
select case num
case 1
english_WeekDay="Sunday"
case 2
english_WeekDay="Monday"
case 3
english_WeekDay="Tuesday"
case 4
english_WeekDay="Wednesday"
case 5
english_WeekDay="Thursday"
case 6
english_WeekDay="Friday"
case 7
english_WeekDay="Saturday"
end select
end function
private sub cmdShow_Click()
label1.caption=english_WeekDay(weekday(date))
end sub
這是目前我能想到的方法,不知道還有沒有更直接的方法或函數了。