in reply to conversion of a timestamp

first, don't call the column 'timestamp' -- you'll run into issues/confusion at somepoint w/that being a reserved word ..

As for splitting up the value, you can use split or regex (perlre) or one of the many Date modules .. examples of the first two are below (i recommend error-checking on them)
my ($y, $m, $d, $h, $min, $s) = split /[- :]/, $timestamp; my ($y, $m, $d, $h, $min, $s) = $timestamp =~ /^(\d{4})-(\d\d)-(\d\d) +(\d\d):(\d\d):(\d\d)$/; # more robust

Replies are listed 'Best First'.
Re^2: conversion of a timestamp
by barrycarlyon (Beadle) on Apr 10, 2006 at 22:04 UTC

    timestamp was just used as an example

    Barry Carlyon barry@barrycarlyon.co.uk
Re^2: conversion of a timestamp
by barrycarlyon (Beadle) on Apr 10, 2006 at 22:06 UTC

    how do i set $timestamp that you used?

    Barry Carlyon barry@barrycarlyon.co.uk

      You fetch it from the database; it's just an example.