Up Prev Next
From: Bernd dot Brinkmann at Bertelsmann dot DE
Subject: Re: DateTime Values
Date: Nov 18 1997 6:32PM
Thanks for replying, Michael.
But the default datetime format is different on some locations. While
snooping around in my company, i found several output formats for the
datetime-type. To change this behavior, a call to cs_dt_info(cs_set,
cs_dt_convfmt) has to be made. I hacked this into my version of
CTlib.xs, but i think this function is important enough to get into
sybperl 2.09 (like cs_locale).
Von: Michael Peppler
Betreff: Re: DateTime Values
Datum: Donnerstag, 13. November 1997 16:50
> As I am quiet new with Sybperl, I have encounterd a problem -
> Can anyone give me a clue, if there is a possibility to retrieve a
> DateTime value (date and time) without using "UseDateTime" followed by
> I need this for a fast (!!!) output-routine that dumps large amounts
> data (> 1.500.000 rows gathered by joins, etc.) and therefore a
> conversion inside a while-loop is too time consumpting.
How do you need your data converted?
You could write your queries to return the date and the time
portion separately (using convert()), or you could use some
fancy split() or pattern match to extract the appropriate fields.
The default datetime format is
Nov 13 1997 7:47:05:293AM
which could be matched by something like
$date =~ /(\w+) +(\d+) +(\d+) +(\d+):(\d+):(\d+):(\d+)(\w+)/;
$mon = $1;
$day = $2;
$year = $3;
Michael Peppler -||- Data Migrations Inc.
email@example.com -||- http://www.mbay.net/~mpeppler