Date conversion constellation function, the parameters are date type, friends in need can refer to it.
Copy the code as follows: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) 'Reorganization month and day, 0903 type
rAstro=split(Aquarius*0120*0219#Pisces*0220*0320#Aries*0321*0420#Taurus*0421*0521#Gemini*0522*0621#Cancer *0622*0722#Leo*0723*0823#Virgo*0824*0923#Libra*0924*1023#Scorpio*1024*1122#Sagittarius*1123*1222#Capricorn*1222*0119#,#)
astro=Capricorn' This is New Year's Eve, so it's hard to compare. Let's default to
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