/ Forside / Teknologi / Udvikling / ASP / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
ASP
#NavnPoint
smorch 9259
Harlekin 1866
molokyle 1040
Steffanst.. 758
gandalf 657
smilly 564
gibson 560
cumano 530
MouseKeep.. 480
10  Random 410
hjälp med datum och tid
Fra : roger


Dato : 12-06-01 12:35

HI
I am having a big problem with how to pick information from an
access
database.
I have a database with following columns.
From date: From time: To date: To time:

All kolumns are in date/time format an I would like to pick out
specific
information like
2001-05-25 at 07:00 will steven begin to work and end his work
at 2001-05-
28 06:59 and 2001-05-28 at 07:00 will sara begin to work and end
at 2001-
06-01 at 06:59 and so on.
What do I ´want to do??
I want that each person show up the webpage when they working and
just one
person at the time.
Today I write like this and it's workin but just with date and
when i put
in the time it all goes crazy(not working).

<%Response.buffer=true%>
<%session.lcid=1053%>
<%dim rs,recset,sql,connect,datum,tid
Set Connect = Server.CreateObject("ADODB.Connection")
'Connect.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" &
Server.MapPath("Vhi.mdb")
connect.open("vhi")
datum=formatDateTime(date, vBShortdate)
tid=formatDateTime(time, vBShorttime)
sql="select fnamn,enamn,foto,DatumFran,DatumTill from Datum inner
join VHI
on Datum.Vhiid=VHI.Vhiid WHERE DatumFran <= '"&datum&"' AND
DatumTill
>= '"&datum&"' ;"
set recset=connect.execute(sql)
%>

can some please help me with this I would be so very happy.

Roger



--
Dette indlæg er sendt fra http://www.html.dk
* Søg og læs i de danske nyhedsgrupper om webdesign
* Tutorials og artikler om webdesign på dansk

 
 
Morten F. Klausen (14-06-2001)
Kommentar
Fra : Morten F. Klausen


Dato : 14-06-01 09:47

Try for instance
set rs = Server.CreateObject("ADODB.recordset")

rs.Open "select Format(DATO,'dd/mm/yyyy') from TABLE", conn
or
rs.Open "select Format(DATO,'dd-mm-yyyy') from TABLE", conn
or
rs.Open "select Format(DATO,'dd.mm.yyyy') from TABLE", conn
but NOT
rs.Open "select DATO from TABLE", conn

Best Regards
Morten F. Klausen

"roger" <roger@weijmer.home.se> wrote in message
news:9g4upd$bft$1@sunsite.dk...
> HI
> I am having a big problem with how to pick information from an
> access
> database.
> I have a database with following columns.
> From date: From time: To date: To time:
>
> All kolumns are in date/time format an I would like to pick out
> specific
> information like
> 2001-05-25 at 07:00 will steven begin to work and end his work
> at 2001-05-
> 28 06:59 and 2001-05-28 at 07:00 will sara begin to work and end
> at 2001-
> 06-01 at 06:59 and so on.
> What do I ´want to do??
> I want that each person show up the webpage when they working and
> just one
> person at the time.
> Today I write like this and it's workin but just with date and
> when i put
> in the time it all goes crazy(not working).
>
> <%Response.buffer=true%>
> <%session.lcid=1053%>
> <%dim rs,recset,sql,connect,datum,tid
> Set Connect = Server.CreateObject("ADODB.Connection")
> 'Connect.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" &
> Server.MapPath("Vhi.mdb")
> connect.open("vhi")
> datum=formatDateTime(date, vBShortdate)
> tid=formatDateTime(time, vBShorttime)
> sql="select fnamn,enamn,foto,DatumFran,DatumTill from Datum inner
> join VHI
> on Datum.Vhiid=VHI.Vhiid WHERE DatumFran <= '"&datum&"' AND
> DatumTill
> >= '"&datum&"' ;"
> set recset=connect.execute(sql)
> %>
>
> can some please help me with this I would be so very happy.
>
> Roger
>
>
>
> --
> Dette indlæg er sendt fra http://www.html.dk
> * Søg og læs i de danske nyhedsgrupper om webdesign
> * Tutorials og artikler om webdesign på dansk



Søg
Reklame
Statistik
Spørgsmål : 177557
Tips : 31968
Nyheder : 719565
Indlæg : 6408869
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste