FYI the following is incorrect:
;;;You must have to convert first your date format from
vb to php
;;;
vb is like mon/date/year
;;;php is year/mon/date
This question seems very similar to this post of yours:
http://p2p.wrox.com/topic.asp?TOPIC_ID=69130
You have been lucky enough to have been given advise from one of the Wrox MVP's. The link he gave you from classicasp.aspfaq.com is a very good one, it has all your answers.
IMO you should ALWAYS wrap functions around dates being inserted into any DB and wrap functions around ALL dates rendered on web pages. This is the function I use to ensure whwn inserting a date into a DB it ALWAYS gets turned into American date format (mm/dd/yyyy)
FUNCTION amDate(varDate)
IF DatabaseType = iDT_SQLServer THEN
IF isNull(varDate) OR Trim(varDate) = "" OR varDate = "Null" THEN
amDate = "Null"
ELSE
amDate = "'" & Month(DateValue(varDate)) & "/" & Day(DateValue(varDate)) & "/" & Year(DateValue(varDate)) & " " & TimeValue(varDate) & "'"
END IF
ELSE
IF isNull(varDate) OR Trim(varDate) = "" OR varDate = "Null" THEN
amDate = "Null"
ELSE
amDate = "'" & Day(DateValue(varDate)) & "/" & Month(DateValue(varDate)) & "/" & Year(DateValue(varDate)) & " " & TimeValue(varDate) & "'"
END IF
END IF
END FUNCTION
Note - you may not want the:
IF DatabaseType = iDT_SQLServer THEN
condition, im sure you can work it out from here...
Wind is your friend
Matt
www.elitemarquees.com.au