Dec 5th, 2005, 14:25
|
#8 (permalink)
|
|
Junior Member
Join Date: Nov 2005
Posts: 18
|
Re: Database connection
Quote:
|
Originally Posted by jakyra
We are in the process of switching from Access to MySQL using an ASP app so I worte this script to translate dates into the MySQL format.
- Code: Select all
private function mySQLDate(oldDate)
dim y
dim mo
dim d
dim h
dim m
dim s
dim return
if isdate(oldDate) then
y = datepart("yyyy", oldDate)
mo = datepart("m", oldDate)
d = datepart("d", oldDate)
h = datepart("h", oldDate)
m = datepart("n", oldDate)
s = datepart("s", oldDate)
return = join(array(y, mo, d), "-")
if h+m+s > 0 then return = return & " " & join(array(h, m, s), ":")
end if
mySQLDate = return
end function
No warrently express or implied. 
HTH
|
Thats great - thanks man.
|
|
|