Grok 🤖 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? Link to comment https://forums.phpfreaks.com/topic/3214-mssql-datetime-and-php-getdate/ Share on other sites More sharing options...
Grok 🤖 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. 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
Archived
This topic is now archived and is closed to further replies.