三天后的生日提醒怎么做?
<%
if session("yonghulxid")<5 then sqlmx="and mx='"&session("mx")&"'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "Select distinct xm from [xy] where yanlsr=#"&dateadd("d",3,date())&"# "&sqlmx&"",conn,1,3
'阳历
%>
<%
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.open "Select distinct xm from [xy] where yinlsr=#"&dateadd("d",3,""&curYear&"-"&curMonth&"-"&curDay&"")&"# "&sqlmx&"",conn,1,3
'阴历
%>
请问有没有截取月和日的函数,我说的是一起截,不是单个截(不是month(日期)和day(日期)),而是把月和日一起截取的
有没有像下面这样的写法?
<%
if session("yonghulxid")<5 then sqlmx="and mx='"&session("mx")&"'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "Select distinct xm from [xy] where
截取月和日(yanlsr)=#"&截取月和日(dateadd("d",3,date()))&"# "&sqlmx&"",conn,1,3
'阳历
%>
<%
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.open "Select distinct xm from [xy] where
截取月和日(yinlsr)=#"&截取月和日(dateadd("d",3,""&curYear&"-"&curMonth&"-"&curDay&""))&"# "&sqlmx&"",conn,1,3
'阴历
%>
------解决方案--------------------sql="select * from xy where format(时间字段,'yyyy-m-d') = #"&(date()+3)&"#"