asp是的日期轉(zhuǎn)換為星座的函數(shù)
更新時(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#雙魚(yú)座*0220*0320#白羊座*0321*0420#金牛座*0421*0521#雙子座*0522*0621#巨蟹座*0622*0722#獅子座*0723*0823#處女座*0824*0923#天秤座*0924*1023#天蝎座*1024*1122#射手座*1123*1222#摩蝎座*1222*0119#","#")
astro="摩蝎座" '這個(gè)是跨年的,不好對(duì)比,先默認(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中格式化時(shí)間短日期補(bǔ)0變兩位長(zhǎng)日期的方法
這篇文章主要介紹了ASP中格式化時(shí)間短日期補(bǔ)0變兩位長(zhǎng)日期的方法,需要的朋友可以參考下2020-04-04簡(jiǎn)單的ASP統(tǒng)計(jì)制作實(shí)例
一個(gè)能對(duì)訪(fǎng)問(wèn)者進(jìn)行編號(hào)、記錄訪(fǎng)問(wèn)次數(shù)、IP、時(shí)間的統(tǒng)計(jì)制作實(shí)例,需要的朋友可以參考下2015-09-09ASP中DateAdd函數(shù)中日期相加或相減使用方法
本文將介紹ASP中DateAdd函數(shù)中日期相加或相減使用方法,需要了解的朋友可以參考下2012-12-12數(shù)據(jù)庫(kù)記錄的刪除,delete好還是update好?
數(shù)據(jù)庫(kù)記錄的刪除,delete好還是update好?...2006-10-10