Dato på dansk via en US server opsætning, avanceret
Hejjeg har denne kode herunder som viser DK datoformat, når man indtaster data, men når den trækker dataen ud af databasen og skal sortere efter den hvor den automatisk laver måned opdeling butter den om på datoformatet, så 03/05/04 bliver til 05/03/04
er der en som kan hjælpe mig med at få rettet denne funktion til så den viser dansk data format helevejen, selvom at det er en US server opsætning.
<% session.LCID=1030 %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Aktivitetskalender </title>
</head>
<body>
<table border="0" cellpadding="0" width="675" cellspacing="0">
<tr>
<th bgcolor="#6699FF" align="left" width="81"><b><font face="Verdana" color="#FFFFFF" size="2">Måned</font></b></th>
<th bgcolor="#6699FF" align="left" width="190"><b><font face="Verdana" color="#FFFFFF" size="2">Aktivitet</font></b></th>
<th bgcolor="#6699FF" align="left" width="98"><b><font face="Verdana" color="#FFFFFF" size="2">Sted</font></b></th>
<th bgcolor="#6699FF" align="left" width="85"><b><font face="Verdana" color="#FFFFFF" size="2">Deltagere</font></b></th>
<th bgcolor="#6699FF" align="left" width="82"><b><font face="Verdana" color="#FFFFFF" size="2">Ansvarlig</font></b></th>
<th bgcolor="#6699FF" align="left" width="102"><b><font face="Verdana" color="#FFFFFF" size="2">Gruppe</font></b></th>
<th bgcolor="#6699FF" align="left" width="162"><b><font face="Verdana" color="#FFFFFF" size="2">type</font></b></th>
</tr>
<tr>
<td colspan="7"><br></td>
</tr>
<%
Set oDB = Server.CreateObject("ADODB.connection")
oDB.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("Akt.mdb")
Set oRS = oDB.execute("select * from [Aktiviteter] where month(datoStart)>=month(Date()) AND year(datoStart)>=year(Date()) ORDER BY DatoStart ")
p=0
tmp=""
do while not oRS.EOF
if tmp <> Month(oRS("datoStart")) then
tmp = Month(oRS("datoStart"))
Response.Write "<tr><td bgcolor=""#6699FF"" colspan=""7""><font face=""Verdana"" size=""2"" color=""White""><b>" & MonthName(tmp) & "</b></font></td></tr>"
end if
%>
<%
if p=0 then
bg="bgcolor='#C0C0C0'"
else
bg=""
End if
%>
<tr>
<td <%= bg %> width="81"><font face="Verdana" size="1"><%= oRS("DatoStart") %><br><%= oRS("DatoSlut") %></font></td>
<td <%= bg %> width="190"><font face="Verdana" size="1"><b><%= oRS("Aktivitet") %></b><br><%= oRS("Beskrivelse") %></font></td>
<td <%= bg %> width="98"><font face="Verdana" size="1"><%= oRS("Sted") %></font></td>
<td <%= bg %> width="85"><font face="Verdana" size="1"><%= oRS("Deltagere") %></font></td>
<td <%= bg %> width="82"><font face="Verdana" size="1"><%= oRS("Ansvarlig") %></font></td>
<%
Set oRR = oDB.execute("SELECT * FROM [Grupper] ")
%>
<td <%= bg %> width="102"><font face="Verdana" size="1">
<% IF oRS("Gruppe") = 1 Then response.write "Billeddiagnostik" %>
<% if oRS("Gruppe") = 2 Then response.write "Dental" %>
<% if oRS("Gruppe") = 3 Then response.write "Kirurgi" %>
<% if oRS("Gruppe") = 4 Then response.write "Urologi" %></font>
</td>
<%
Set oRR = oDB.execute("SELECT * FROM [Typerne] ")
%>
<td <%= bg %> width="162"><font face="Verdana" size="1">
<% IF oRS("Type") = 1 Then response.write "Aktivitet" %>
<% if oRS("Type") = 2 Then response.write "Udsendelse" %></font>
</td>
</tr>
<%
if p=0 then
p=1
else
p=0
end if
%>
<%
oRS.Movenext
Loop
oDB.Close
set oRS = Nothing
%>
<tr>
<td colspan="7">
<hr noshade style="border-left-style: dashed; border-left-width: 3px; border-right-style: dashed; border-right-width: 1px; border-top-style: dashed; border-top-width: 1px" color="#6699FF" size="1">
</td>
</tr>
</table>
</body>
</html>
