Hallo Andreas,
ich hatte mir einmal folgende Funktion gebastelt f�r das Datumsproblem beim SQL-server:
function mySQLdate(datestring)
if not isdate(datestring) then datestring = date
'' Escape-Klausel laut SQL-OnlineDoku:
'' { ts '1998-05-02 01:23:56.123' }
'' { d '1990-10-02' }
'' { t '13:33:41' }
mySQLdate = " {d '" & Year(datestring) & "-" & right("0" & Month(datestring), 2) &
"-" & right("0" & day(datestring), 2) & "'}"
end function
Einsatz:
mySQLstring = "select * from myTable where myDate > " & mySQLdate(dasDatum)
Funzt aber soweit ich weiss nur bei Zugriffen �ber ODBC....?
Evtl hilfts Dir trotzdem weiter
Gr��e
Patrick
-----Urspr�ngliche Nachricht-----
Von: Andreas Rudischhauser (N) [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 20. Februar 2003 18:59
An: [EMAIL PROTECTED]
Betreff: [Asp.net] SQL und Datum
Wie mach ich am einfachste eine SQL Abfrage mit einem Datum im WHERE
Abschnitt? Ich wei� das (bei Access) im SQL das Datum immer amerikanisch
formatiert sein muss....
Ich dachte mit den Parametern entgege ich dem umkonvertieren des Datums,
aber es scheint nicht so...?
Wer hat einen guten Code dazu?
_______________________________________________
Asp.net mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/asp.net
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________
_______________________________________________
Asp.net mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/asp.net