找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 2419|回复: 0

[杂谈] asp的日期转换星座函数

[复制链接]
发表于 2010-10-30 16:50:51 | 显示全部楼层 |阅读模式 来自 广东省广州市
  1. '日期转换星座函数,参数是日期型
  2. function astro(birth)
  3. astro=""
  4. if birth="" or not isdate(birth) Then exit function
  5. birthmonth=month(birth) : if birthmonth<10 then birthmonth="0" & birthmonth
  6. birthday=day(birth) : if birthday<10 then birthday="0" & birthday
  7. birth=trim(birthmonth & birthday) '重整月日,0903型

  8. 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#","#")

  9. astro="摩蝎座" '这个是跨年的,不好对比,先默认
  10. for i_ls=0 to ubound(rAstro)-2
  11. rls2=split(rAstro(i_ls) & "*","*")
  12. if birth>=rls2(1) and birth<=rls2(2) then
  13.   astro=rls2(0)
  14.   exit for
  15. end if
  16. next
  17. end function
复制代码

发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;

如何回报帮助你解决问题的坛友,好办法就是点击帖子下方的评分按钮给对方加【金币】不会扣除自己的积分,做一个热心并受欢迎的人!

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则 需要先绑定手机号

关闭

站长推荐上一条 /1 下一条

QQ|侵权投诉|广告报价|手机版|小黑屋|西部数码代理|飘仙建站论坛 ( 豫ICP备2022021143号-1 )

GMT+8, 2024-5-11 04:50 , Processed in 0.055676 second(s), 10 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表