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: "Avis, Ed" <avised at kbcfp dot com>
Subject: RE: ISO8601 date formats
Date: Sep 21 2004 1:41PM

Michael Peppler wrote:

>At the moment DBD::Sybase has a $dbh->func() call that you can use to
>control the date/time formating.

>I propose to make this just a bit more sophisticated, by binding
>date/time values as a CS_DATETIME value (a struct with two 4 byte
>ints, the first for the number of days since jan 1 1900, and the
>second for the number of milliseconds since midnight).

>If the user wants ISO8601 formats I call cs_dt_crack() to get
>something that resembles as struct tm, and then use sprintf or 
>strftime() to build the char string.

Sounds useful.  I wonder whether in the longer term Sybase would add
some more standard date formats to ctlib?

On the question of which ISO 8601 variant to support, the full
pedantic one with the T in the middle is something you 'should' have
(if you're going to support a standard, do it properly) but a
simpler form like 2004-09-21 14:40:00 would also be handy, if it
doesn't complicate the interface to allow both.

-- 
Ed Avis