Thats not the problem

heres an example...

#!/usr/bin/perl

use POSIX;

print strftime "%d","980596729";

........

980596729 is the value give when i go
select UNIX_TIMESTAMP(time) from database.........

i get this error

Usage: POSIX::strftime(fmt, sec, min, hour, mday, mon, year, wday = -1,
yday = -1, isdst = -1) at ./test.pl line 7.

which is because the number given to strftime should be like
1910103101013301

select time from database....
(time is a timestamp)

gives a number
YYYYMMDDHHMMSS eg 20011010101010

im happy to get either to a format strftime can understand

Dean

John Clarke wrote:
> 
> On Tue, Jan 30, 2001 at 08:49:34PM +1100, Dean Hamstead wrote:
> 
> > Im trying to get a value from a timestamp field
> > into a format that strftime can manipulate.
> 
> Here's an example from the perlfunc man page:
> 
>        use POSIX qw(strftime);
> 
>        $now_string = strftime "%a %b %e %H:%M:%S %Y", gmtime;
> 
> If you want local time, you'd obviously use localtime() in place of
> gmtime().
> 
> Cheers,
> 
> John
> --
> whois [EMAIL PROTECTED]
> 
> --
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://slug.org.au/lists/listinfo/slug

-- 
BONG: http://www.bong.com.au
EMAIL...
[EMAIL PROTECTED]        [EMAIL PROTECTED]
[EMAIL PROTECTED]      [EMAIL PROTECTED]
ICQ: 16867613


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to