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 29 2003 10:22PM

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