stockton Posted January 17, 2006 Share Posted January 17, 2006 I am attempting using the result of getdate() as a key to a MSSQL database. The MSSQL index is a SQLDATETIME.I use :-$StartDate = getdate();and after connecting and selecting the databasemssql_bind($proc, "@StartDate", $StartDate, SQLDATETIME);This fails. Is there something I need to do to the variable I get from getdate() before making the MSSQL call? Quote Link to comment https://forums.phpfreaks.com/topic/3214-mssql-datetime-and-php-getdate/ Share on other sites More sharing options...
stockton Posted January 19, 2006 Author Share Posted January 19, 2006 I found that using $Datum = date("'Y-m-d H:i:s'"); rather than getdate() worked fine. Quote Link to comment https://forums.phpfreaks.com/topic/3214-mssql-datetime-and-php-getdate/#findComment-10997 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.