asp的日期转换星座函数
时间:2010-06-09 21:05:00
asp日期转换星座函数,参数是日期型
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="摩蝎座" '这个是跨年的,不好对比,先默认
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
标签:asp,星座,函数,日期
0
投稿
猜你喜欢
动态导航设计
2008-09-21 13:40:00
YUI Compressor快速使用指南
2011-06-27 20:07:30
制作全局临时表
2010-06-11 13:36:00
SQL Server 2008的一些新特点及独到之处
2009-01-15 12:59:00
SQL Server 2000 占内存居高不下可能的原因及其解决方法
2010-04-25 10:39:00
asp 过滤非法字符函数
2011-04-07 10:39:00
Oracle数据库快照的使用
2010-07-28 13:32:00
如何根据用户银行帐户余额的多少进行显式的提交或终止?
2009-11-22 19:28:00
MySQL的一级防范检查列表
2011-12-14 18:39:22
Oracle的默认用户密码
2012-07-11 15:29:22
ASP中Cookies集合使用方法详解
2007-09-14 10:16:00
在Linux下安装Oracle
2010-07-30 12:46:00
如何使用表格来储存数据库的记录?
2010-05-16 15:14:00
(小技巧)复制消息对话框的内容
2008-10-21 10:51:00
区别div和span、relative和absolute、display和visibility
2009-12-13 12:18:00
ASP实现GB2312转UTF-8函数
2009-02-26 13:08:00
DW MX新功能试用:嵌套模板
2008-02-03 11:35:00
IE bug: 消失的绝对定位元素
2009-10-26 17:59:00
web标准知识——美化段落文本 Ⅱ
2008-07-22 12:12:00
oracle 集合
2009-06-19 18:09:00