Datum gruppieren?

Tep

Grünschnabel
Hmmm, hallo Leute!

Ich würde gerne eine Datumgruppierung vornehmen:

Sonntag, 17.August 2006
1.BL - 15:15 Uhr
FC Bayern - Schalke 04
--------------------------
1.RLN - 16:45 Uhr
VFL Wolfsburg - Werder Bremen
--------------------------
OL-H - 11:00 Uhr
Bad Nenndorf - SV Winsen

Dienstag, 19.August 2006
--------------------------
2.RLN - 20:15 Uhr
VFL Hohenhameln - TuS Celle


etc.

Ich habe folgende Struktur im script, weiß aber nicht weiter (die Hitze :))

Code:
<%
SQL = "Select * from Spielplansortiert where  Datum <= now() +180 AND Datum >= now() order by datum ASC, zeit ASC"
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.Open SQL,Conn, 3, 3
Do while not rs.EOF
%> 
    <a href="spiele/readnews4.asp?ID=<%=rs.fields("ID").value%>"target="content" onclick="top.scrollTo(0,0);"> 
  <%response.write "<font face=tahoma font size=-2 font color=#666666><b></u> " & rs("Staffel")& "</b><font face=tahoma font size=-2 font color=#666666>" &"  -  " & rs("Wochentag") & ". " & rs("Datum") & ", " & rs("Zeit") & "h</u><br>  <font size=-2 font color=#3399ff> "& _
    (replace( rs.Fields("Ausdruck1"), "FC Bayer München", "FC Bayern") )&" "%>  
  </a><br><FONT color="#999999" size=-2 face=tahoma><hr align="left" width="200" size="-3" noshade color="#FFA400">

  <%
    rs.movenext
Loop
rs.Close
Conn.Close
set rs = nothing
set Conn = nothing
%>

Bin für jede Hilfe sehr dankbar!
Gruß
Tep
 
Hallo Luzie...

das war ein guter Tipp!
Hab das jetzt so eingearbeitet und habe ein html Problem.... komme da einfach nicht weiter:

Code:
  <!--#include file ="spiele/include/db.asp"-->

    <%
SQL = "Select * from Spielplansortiert where  Datum <= now() +180 AND Datum >= now() order by datum ASC, zeit ASC"
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.Open SQL,Conn, 3, 3
dim myMonth 
while not objrs.eof
if myMonth = "" or myMonth <> month(objrs("datum")) then
%><form>
     <fieldset width="100%">
    <legend><b><font size="-1" face="Tahoma"><font color="#FFA400"><% Response.write "<div style=""font-weight:bold"">" & monthname(month(objrs("datum"))) & " " & year(objrs("datum")) & "</div>"
myMonth = month(objrs("datum"))
end if%></font></b></legend>
        <a href="spiele/readnews4.asp?ID=<%=objrs.fields("ID").value%>"target="content" onClick="top.scrollTo(0,0);"> 
		
       &nbsp;&nbsp; <%response.write "<font face=tahoma font size=-2 font color=#999999></u><b> " & objrs("Wochentag") &". " & objrs("Datum") &", "& objrs("Zeit") & "h" & " </b><font face=tahoma font size=-2 font color=#ffffff>" & objrs("Zeit") & "h</u><br>&nbsp;&nbsp;<font size=-2 font color=#3399FF> "& _
        (replace( objrs.Fields("Ausdruck1"), "FC Bayer", "Bayern") )& "</u><font face=tahoma font size=-2 font color=#999999><hr align='left' width='200' size='-2' noshade color='#FFA400'> "&" "%>
        </a>
  <%objrs.movenext
wend %>
  <FONT color="#000000" size=-2 face=tahoma></font> </div>

</form>

Es geht dabei um die Fieldsets. Ich habe sie in der Legend eingebaut, doch nun bekomme ich pro Monat ein Fieldset in die andere eingebaut. Also Dezember taucht in die November Fieldset auf...
Hoffe, Du verstehst was ich meine.
Hast Du da eine Lösung?

Danke
Tep
 
Tep hat gesagt.:
Es geht dabei um die Fieldsets. Ich habe sie in der Legend eingebaut, doch nun bekomme ich pro Monat ein Fieldset in die andere eingebaut. Also Dezember taucht in die November Fieldset auf...
Hoffe, Du verstehst was ich meine.
Hast Du da eine Lösung?

Danke
Tep

Hi

das kann ich mir vorstellen. Der Quellcode ist echt gruselig :-( :-(
Ich denke mal, das kriegst Du alleine hin.

Denk dran, das jeder geöffnete Tag auch irgendwann an der richtigen Stelle wieder geschlossen werden muss und für jeden schließenden Tag, auch irgendwo ein geöffneter Tag vorhanden sein muss. Alle Tag (<form>), die überflüssig sind, müssen da auch nicht rein.

Ein Tipp, man sollte html mit CSS (style sheets) formatieren, das hat große Vorteile. Zum einen eine einheitliche Struktur und zum anderen viel weniger Quellcode.

Hier ein paar Seiten, die ich empfehlen möchte
http://css.fractatulum.net/index.htm
http://jendryschik.de/wsdev/einfuehrung/
http://de.selfhtml.org
http://www.css4you.de
http://www.style-sheets.de
 

Neue Beiträge

Zurück