PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: RE: datetime values
Date: Jan 30 2003 4:19PM

On Thu, 2003-01-30 at 04:50, Sabherwal, Balvinder (MBS) wrote:
> I tried using  "$dbh->cs_dt_info(CS_SET, CS_DT_CONVFMT, CS_UNUSED,
> CS_DATES_LONG );" and now I get the error as below.
> 
> Usage: Sybase::CTlib::cs_dt_info(action, type, item, buffer) at C:\tmp\x.pl
> line 13.

Lose the $dbh->. It's not a method - it's just a regular function that
affects all connections.

Michael


> -----Original Message-----
> From: Scott Zetlan [mailto:scottzetlan@aol.com]
> Sent: Wednesday, January 29, 2003 5:38 PM
> To: SybPerl Discussion List
> Subject: RE: datetime values
> 
> 
> Also consider just using smalldatetime (stores dates down to the minute)
> instead of datetime -- rarely does anyone really need that kind of
> resolution on a time stamp.
> 
> > -----Original Message-----
> > From: owner-SYBPERL-L@list.cren.net
> > [mailto:owner-SYBPERL-L@list.cren.net]On Behalf Of Michael Peppler
> > Sent: Wednesday, January 29, 2003 5:23 PM
> > To: SybPerl Discussion List
> > Subject: Re: datetime values
> >
> >
> > On Wed, 2003-01-29 at 13:13, Sabherwal, Balvinder (MBS) wrote:
> > > List,
> > >
> > > I am selecting a datetime type column from the database table
> > and while I'm
> > > losing the second and ms second value from it. Can anyone show
> > me how can I
> > > preserve the second and ms as well in my select.
> > > i.e. if I select the value in dbartisan it shows me as "1/29/03
> > 3:03:13.847
> > > PM" but if I select and print the same column from the perl
> > scrip, it shows
> > > me only "1/29/03 3:03PM"
> >
> > You can use cs_dt_info(CS_SET, CS_DT_CONVFMT, CS_UNUSED, CS_DATES_LONG)
> > to get the full date (including milliseconds).
> >
> > Michael
> > > --
> > > Michael Peppler                              Data Migrations, Inc.
> > > mpeppler@peppler.org                 http://www.mbay.net/~mpeppler
> > > Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available
> > for short or
> > > long term contract positions - http://www.mbay.net/~mpeppler/resume.html
> >
> >
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                 http://www.mbay.net/~mpeppler
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
long term contract positions - http://www.mbay.net/~mpeppler/resume.html