X-Original-To: pgsql-general-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5E7E79FA5BA for ; Thu, 8 Jun 2006 01:41:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 37577-09 for ; Thu, 8 Jun 2006 01:41:13 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.200]) by postgresql.org (Postfix) with ESMTP id 53D6F9FB1C4 for ; Wed, 7 Jun 2006 23:36:02 -0300 (ADT) Received: by nz-out-0102.google.com with SMTP id l1so316258nzf for ; Wed, 07 Jun 2006 19:36:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=qUDPW2W3Awfl0MTMZ9jYGESSgHyC67WCqPu/1yuxzu6+RC436AuiYm74EqLZ3BzOjvRbQR383HPVmDYTmwFkFOx56wGLbbkvB8iycAAjZ8B94n3+C35UkXgsPSq0MYP6sGojrSYTGkJpQOWQYhwkUEurlisjQMVqNHFIC8RlRhs= Received: by 10.36.196.20 with SMTP id t20mr1641741nzf; Wed, 07 Jun 2006 19:36:00 -0700 (PDT) Received: from ?10.1.1.21? ( [203.217.18.65]) by mx.gmail.com with ESMTP id r9sm891548nza.2006.06.07.19.35.59; Wed, 07 Jun 2006 19:36:00 -0700 (PDT) Message-ID: <44878D0F.6040501@gmail.com> Date: Thu, 08 Jun 2006 12:35:59 +1000 From: Chris User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: "surabhi.ahuja" CC: pgsql-general@postgresql.org Subject: Re: date value not geting inserted properly References: <8626C1B7EB748940BCDD7596134632BE398687@jal.iiitb.ac.in> In-Reply-To: <8626C1B7EB748940BCDD7596134632BE398687@jal.iiitb.ac.in> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/253 X-Sequence-Number: 96625 surabhi.ahuja wrote: > i have a cloumn in my table which is date type > > i parse a file to get the date from there, > > and then i form a call to the stored procedure, with the above data as > the parameter. > > but however it seems that when i form this call, something is messing > up, and the value for the birth date, getting into that field is > "1969-12-31" , > and this happens always, it inserts this value only, whtever be the > input data value. > > i am pasting the code that i am trying to do > > stmt.setObject(i + 1, (tagV.value), > ((TypeAttrib) (primaryKeyMap_.get(tMap.get(temp)))).dataType); > > can u please tell as to what should the dataType be for date, isnt it > 91- integer? No - a date is a date, it's completely different from an integer. Since this is java, the jdbc list should be able to help you a bit more than this one. -- Postgresql & php tutorials http://www.designmagick.com/