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: "Scott Zetlan" <scottzetlan at aol dot com>
Subject: RE: datetime values
Date: Jan 29 2003 10:38PM

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
>
>