ASP implemented several methods to remind birthdays with code _ Application Tips
Source: Internet
Author: User
ASP Birthday Automatic Reminder program with ASP, debugging through, the use of convenient-asp birthday automatically remind small programs with the preparation of ASP, debug, easy to Use
method One:
Originally written on a class site for the last one months of the classmate Birthday reminder applet. Although not very good, and very messy, but at least it is their own thinking to think, so I value more. Although the ASP program has a lot to learn from others. But I think more of the time, we should be in the classic highlights, innovation that is not to keep the rules and not always can only be an ordinary programmer.
<%
Dim daydif
Dim days ' Define the number of dates before and after the birthday of the students, such as 60 of the one months before the first one months of the list of students.
Sql= "Select Name,brithday from class"
Set Rs=server. CreateObject ("ADODB.") RecordSet ")
Rs. Open sql,con,1,1
For I=1 to Rs.recordcount ' Read all the data
If Rs.eof then exit for
Daydif=abs (DateDiff ("D", Date,rs ("Birthday")) MoD 365
If Daydif < days
Response.Write rs ("name")%>
Response.Write "<font color=" #FF0000 ">"
Response.Write rs ("Birthday") & ", </font>"
End If
Rs.movenext
Loop
Rs. Close
Set rs=nothing
%>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service