Et par funktioner der gør at du får det rigtige output:
Function Nul(intTal) If Len(intTal) = 1 Then intTal0 = 0 & intTal Else intTal0 = intTal End If
Nul = intTal0 End Function
Function MakeDate(Format) Format = Replace(Format, "dd", Nul(Day(Date))) Format = Replace(Format, "mm", Nul(Month(Date))) Format = Replace(Format, "yyyy", Nul(Year(Date))) Format = Replace(Format, "hh", Nul(Hour(Time))) Format = Replace(Format, "nn", Nul(Minute(Time)-5)) Format = Replace(Format, "ss", Nul(Second(Time))) MakeDate = Format End Function
Set rs = Conn.execute("select * from users where sidstset > '" & makedate("dd-mm-yyyy hh:nn:ss") & "'")
<%@ Language=VBScript %> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> </HEAD> <BODY> <% minTid = DateAdd("h", -2, Now) Set Conn=Server.CreateObject("ADODB.Connection") Set rs=Server.CreateObject("ADODB.recordset") Conn.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="&server.Mappath("minDB.mdb"))
SQL="SELECT * FROM Mintabel where sidstset > #"&mintid&"#" rs.Open SQL, conn, 1, 3
do while not rs.EOF Response.Write rs("sidstset")%><br> <% rs.MoveNext loop%> <P><P> <% Response.Write now %> </BODY> </HTML>
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.