note 59671 deleted from ref.mssql by jacques

From: Date: Tue, 13 Dec 2005 12:24:42 +0000
Subject: note 59671 deleted from ref.mssql by jacques
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-100060@lists.php.net to get a copy of this message
Note Submitter: Jayant ---- hey guys, I m stucked up in a stuff and can't proceed further coz of this. Please help me out. I m entering the date in a form in the "DD-MM-YYYY" format, which i then converted into a string using dot(.) operator in php. I have to insert that converted string in "datetime" format in the MSSQl database. I tried in many ways. One of them is: $date = "$month"."/"."$day"."/"."$year"; $query1 = " DECLARE @newdate datetime; SELECT @newdate = convert(varchar(100), '$date',102); INSERT INTO transaction_table values (\"$amount\",\"$goods_type\", @newdate)"; $result1 = mssql_query($query1); Guys please help me out. Thank u very much. U can personally mail me @ the_jayanta@yahoo.com

« previous php.notes (#100060) next »