pauld wrote:
Gunnar Hjalmarsson wrote:
pauld wrote:
im using Date::Manip to convert dates and times eg 2007:08:02 12:23
to allow me to sort them,
Why are you doing that?
C:\home>type test.pl
@dates = ( '2007:08:02 12:23', '2007:10:21 04:40',
'2007:06:05 16:08', '2007:09:11 22
On 12/19/07, pauld <[EMAIL PROTECTED]> wrote:
> im sorting it on a key of the hash
> my @daylistsorted = sort { $$a{'START_DS'} <=> $$b{'START_DS'} }
> @daylist;
> generates a
> Argument "2007:09:30 13:41" isn't numeric in numeric comparison (<=>)
> at ./518573
Have you tried using a string comp
im sorting it on a key of the hash
my @daylistsorted = sort { $$a{'START_DS'} <=> $$b{'START_DS'} }
@daylist;
generates a
Argument "2007:09:30 13:41" isn't numeric in numeric comparison (<=>)
at ./518573
error
my @daylistsorted = sort { $$a{'START'} <=> $$b{'START'} } @daylist;
works
--
To u
pauld wrote:
im using Date::Manip to convert dates and times eg 2007:08:02 12:23
to allow me to sort them,
Why are you doing that?
C:\home>type test.pl
@dates = ( '2007:08:02 12:23', '2007:10:21 04:40',
'2007:06:05 16:08', '2007:09:11 22:20', );
print "$_\n" for sort @dates;
C
the END_DS field is the date field that I want - but as I couldnt
get it back from the seconds since epoch field I included it.
IMHO it would be tideir to just use the (numerical) date-seconds and
convert it back as necessary . i used the Date::Manip function
Date_SecsSince1970($m,$d,$y,$h,$mn,$
pauld wrote:
>
im importing data from an excel spreadsheet into an array of hashes.
the date is initially converted using Date::Format::Excel.
for this bit
{START} = unix start time .{START_DS} = string that I use to convert
to unixtime with
my $var=0;my [EMAIL PROTECTED];
while ($var<$va_leng
On Dec 18, 2007 1:05 AM, John W. Krahn <[EMAIL PROTECTED]> wrote:
snip
> > printf (
> > "%s from $s to %s duration %s %s\n",
snip
You missed the usage of $s instead of %s. I always get bitten by that.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [
On Monday 17 December 2007 15:40, [EMAIL PROTECTED] wrote:
>
> On Dec 17, 3:22 am, [EMAIL PROTECTED] (Pauld) wrote:
> >
> > my $var=0;my [EMAIL PROTECTED];
> > while ($var<$va_length)
> > {
> > print "${$daylistsorted[$var]}{TH} ";
> > print 'from ';
> > print ${$daylistsorted[$var]}{START};
> >
On Dec 17, 3:22 am, [EMAIL PROTECTED] (Pauld) wrote:
> my $var=0;my [EMAIL PROTECTED];
> while ($var<$va_length)
> {
> print "${$daylistsorted[$var]}{TH} ";
> print 'from ';
> print ${$daylistsorted[$var]}{START};
> print ' to '.${$daylistsorted[$var]}{END_DS};
> print " duration ";print int
im importing data from an excel spreadsheet into an array of hashes.
the date is initially converted using Date::Format::Excel.
for this bit
{START} = unix start time .{START_DS} = string that I use to convert
to unixtime with
my $var=0;my [EMAIL PROTECTED];
while ($var<$va_length)
{
print "${$d
pauld wrote:
>
im using Date::Manip to convert dates and times eg 2007:08:02 12:23
to allow me to sort them, which it does .
but I cant see how to get the number back into a human -readable
format
print scalar localtime($var{STARTTIME}); prints the long string . is
there a better way to get ju
On Sunday 16 December 2007 04:31, pauld wrote:
>
> im using Date::Manip to convert dates and times eg 2007:08:02 12:23
> to allow me to sort them, which it does .
> but I cant see how to get the number back into a human -readable
> format
Use the UnixDate() function that comes with Date::Manip.
im using Date::Manip to convert dates and times eg 2007:08:02 12:23
to allow me to sort them, which it does .
but I cant see how to get the number back into a human -readable
format
print scalar localtime($var{STARTTIME}); prints the long string . is
there a better way to get just the bits I wan
13 matches
Mail list logo