|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: datetime fields
Date: Oct 26 1998 4:16PM
Scott D Urban writes:
> We use the datetime data type for our id fields (don't ask). I have just
> begun using the CTLib module and datetime fields in my result sets (using
> ct_sql) seem to be getting truncated to the minute. Is there an attribute
> I can set that will allow ct_sql to return the full field? I am new to
> perl, so an example of code would be appreciated.
This issue has just been discussed.
CTlib provides cs_dt_info() which will let you set a default date
conversion format. Unfortunately cs_dt_info() is buggy and does not
work in any version of sybperl that is offically out. I have a fixed
version here which I hope to release as 2.09_06 soon.
In the meantime, you can add a convert(varchar, datefield, 109) to get
the full date (with seconds and milliseconds).
Another alternative is to set UseDateTime to CS_TRUE, and retrieve the
dates in native datetime format.
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@mbay.net -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
|