asp是的日期轉(zhuǎn)換為星座的函數(shù)
更新時間:2010年04月06日 12:20:27 作者:
日期轉(zhuǎn)換星座函數(shù),參數(shù)是日期型的,需要的朋友可以參考下。
復(fù)制代碼 代碼如下:
function astro(birth)
astro=""
if birth="" or not isdate(birth) Then exit function
birthmonth=month(birth) : if birthmonth<10 then birthmonth="0" & birthmonth
birthday=day(birth) : if birthday<10 then birthday="0" & birthday
birth=trim(birthmonth & birthday) '重整月日,0903型
rAstro=split("水瓶座*0120*0219#雙魚座*0220*0320#白羊座*0321*0420#金牛座*0421*0521#雙子座*0522*0621#巨蟹座*0622*0722#獅子座*0723*0823#處女座*0824*0923#天秤座*0924*1023#天蝎座*1024*1122#射手座*1123*1222#摩蝎座*1222*0119#","#")
astro="摩蝎座" '這個是跨年的,不好對比,先默認(rèn)
for i_ls=0 to ubound(rAstro)-2
rls2=split(rAstro(i_ls) & "*","*")
if birth>=rls2(1) and birth<=rls2(2) then
astro=rls2(0)
exit for
end if
next
end function
您可能感興趣的文章:
相關(guān)文章
ASP中DateAdd函數(shù)中日期相加或相減使用方法
本文將介紹ASP中DateAdd函數(shù)中日期相加或相減使用方法,需要了解的朋友可以參考下2012-12-12數(shù)據(jù)庫記錄的刪除,delete好還是update好?
數(shù)據(jù)庫記錄的刪除,delete好還是update好?...2006-10-10