ON 20081213@9:29:02 AM at page: http://techref.massmind.org/techref/method/realtime.htm#39795.395162037 James Newton[JMN-EFP-786] Says /techref/method/month.asp.htm ASP Month Calendar ON 20081213@9:29:49 AM at page: http://techref.massmind.org/techref/method/month.asp.htm#39795.3957060185 James Newton[JMN-EFP-786] Questions: <% wYear=Request.QueryString("wYear") IF wYear = "" THEN wYear=Request.Form("wYear") IF wYear = "" OR wYear < 1753 OR wYear > 9999 THEN wYear = DATEPART("yyyy",now()) wMonth=Request.QueryString("wMonth") IF wMonth = "" THEN wMonth=Request.Form("wMonth") IF wMonth = "" THEN wMonth=DATEPART("m", now()) szMonth = MonthName(wMonth) SET conn=server.createobject("ADODB.connection") conn.Open "DATABASE=[database name];DSN=[DSN Name];UID=[login];Password=[password];" szSQL = "SELECT DATEPART(dd, RecDate) AS DayOfMonth, DATEPART(dw, RecDate) AS WkDay, " & _ "DaysTopCustomer FROM SalesRecords "& _ "WHERE DATEPART(yyyy, RecDate) = " & wYear & "AND DATEPART(mm, RecDate) = " & wMonth & _ " GROUP BY DATEPART(dd, RecDate), DATEPART(dw, RecDate) "& _ "ORDER BY DATEPART(dd, RecDate)" SET rs1=conn.Execute(szSQL) 'INITIALIZE DAY ARRAY lc = 0 dim d(31) for lc = 1 to 31 D(lc) = " " next 'loop through records for the month & assign to D array. DO WHILE NOT rs1.eof 'DAY ASSIGNMENT LOOP TempD = rs1("DayOfMonth") D(TempD) = rs1("DaysTopCustomer") IF NOT rs1.eof THEN rs1.movenext IF rs1.eof then exit do LOOP %> Single Month View of Perpetual Calendar please dont rip this site

Subscription Sales

<%=szMonth%>, <%=wYear%>


<% 'Determine day of the week the month begins on tempdate = wMonth & "/1/" & wYear bwdom = datepart("w", tempdate) DayOfWeekCounter = 1 'PRINT LEADING BLANK DAYS SELECT CASE bwdom CASE 1 DayOfWeekCounter = 1 CASE 2 %> <%DayOfWeekCounter = 2 CASE 3 %> <%DayOfWeekCounter = 3 CASE 4 %> <%DayOfWeekCounter = 4 CASE 5 %> <%DayOfWeekCounter = 5 CASE 6 %> <%DayOfWeekCounter = 6 CASE 7 %> <%DayOfWeekCounter = 7 CASE ELSE %> <% END SELECT 'Determine last day of month & number of weeks IF wMonth < 12 THEN ldom = Day(DateAdd("d", -1, wMonth + 1 & "/1/" & wYear)) ELSE ldom = Day(DateAdd("d", -1, "1/1/" & wYear + 1)) END IF NumWeeks = 5 IF (bwdom = 6 AND ldom = 31) OR (bwdom = 7 AND ldom > 29) THEN NumWeeks = 6 IF bwdom = 1 AND ldom = 28 THEN NumWeeks = 4 DayCounter = 1 WeekCounter = 1 DO WHILE WeekCounter < NumWeeks + 1 DO WHILE DayOfWeekCounter < 8 IF DayCounter < ldom + 1 THEN %> <%END IF DayOfWeekCounter = DayOfWeekCounter + 1 DayCounter = DayCounter + 1 LOOP DayOfWeekCounter = 1 WeekCounter = WeekCounter + 1 %> <%LOOP%>
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
                     Beginning Day of Week Error
<%=DayCounter%>

  <%=D(DayCounter)%>

<%ELSE%>
 
<%IF wMonth = 1 THEN%> Previous    Next <%ELSEIF wMonth = 12 THEN%> Previous    Next <%ELSE%> Previous    Next <%END IF%>
  Year (1753 to 9999):
Full Year View

file: /techref/method/new200812.txt, 19KB, , updated: 2008/12/13 09:45, local time: 2009/1/8 10:07,
TOP NEW HELP FIND: 
38.103.63.57:LOG IN
©2009 PLEASE DON'T RIP! DO: LINK / DIGG! / MAKE!

 ©2009 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it!
<A HREF="http://techref.massmind.org/techref/method/new200812.txt"> Single Month View of Perpetual Calendar</A>

Did you find what you needed?

 

Welcome to massmind.org!

  'What can I do?' - SiCKO

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .