<% ' Changes for Baby Prints implementation. Set xDate to last date of previous web nursery. ' The Previous 3 Months links at the bottom of the page are calculated from xDate. xDate = "10/31/2005" s_month = Request("mnth") If s_month ="" then s_month=xDate end if startdate = DateSerial(Year(s_month), Month(s_month), 1) enddate = DateSerial(Year(s_month), Month(s_month)+1, 1-1) Set Connection=Server.CreateObject("ADODB.Connection") Connection.Open "DSN=babies" S="SELECT * FROM babies WHERE DOB BETWEEN #" & startdate & "# AND #" & enddate & "# ORDER BY [DOB] DESC" set rs =Connection.Execute(S) %>
The Medical Center Babies

The Medical Center proudly welcomes these new arrivals!


<% Do until rs.EOF DOB=rs("DOB") %> <% RS.movenext Loop date1 = DateAdd("m", -0, xDate) date2 = DateAdd("m", -1, xDate) date3 = DateAdd("m", -2, xDate) %>
> <%=rs("FirstName")%> <%=" born to " & rs("Mom") & " on    " & FormatDateTime(DOB, 1) %>



Previous 3 Months


><%=MonthName(Month(date1))%> ><%=MonthName(Month(date2))%> ><%=MonthName(Month(date3))%>