Changes to a Repost of.....<BR><BR>Inserting Dates & Times from ASP into SQL 7<BR>Abel - 8/13/2001 11:29:42 AM<BR><BR>--------------------------------------------------------------------------------<BR> Hi there, I wish to insert a date + time value into my SQL server DB, through a DSNless connection from an ASP page. <BR><BR>Now, the date looks like this on my ASP page: <BR><BR>31/01/2001 14:45:00 <BR>dd/mm/yyyy hh:mm:ss <BR><BR>fine, ASP can use this date, compare it, do everything you would expect. When I try and insert it into a database (between &#039;&#039;s) I get a data type mismatch error, trying to squish a string into a date field. <BR><BR>How can I get the full date/time into the db? I can format it to fit, but that loses the time part! <BR><BR>I am using the data type datetime in SQL and the formatdatetime(x,0) type in ASP, am I doing something wrong there? If I reformat in ASP as formatdatetime(x,2) it comes out as "26 January 2001" but fits into the DB with format &#039;26/01/2001&#039; !! <BR><BR>The server does use the same format, dd/mm/yyyy, of this I am certain!<BR><BR>I&#039;m sure this is easy, but I can&#039;t see the wood for the trees. <BR><BR>When I format in ASP to type &#039;2&#039;, do I actually really lose the time? or is it there? <BR><BR>Cheers, <BR>a *confused* Abel