Help for this page

Select Code to Download


  1. or download this
    my $offset = 65;
    my $date = strftime "%Y-%m-%d",
        localtime(time - $offset * 86400);
    
  2. or download this
    my $datetime = strftime "%Y-%m-%d %H:%M:%S",
        localtime(time - $offset * 86400);
    
  3. or download this
    my $offset = 65;
    my $time = $offset * 86400;
    ...
    where stamp > from_unixtime(?)
    SQL
    $sth->execute($time);
    
  4. or download this
    my $sth = $dbh->prepare_cached(<<SQL);
    select host
    ...
    where to_days(now()) - to_days(stamp) > ?
    SQL
    $sth->execute(7);
    
  5. or download this
    my $sth = $dbh->prepare_cached(<<SQL);
    select host
    ...
    where stamp > date_sub(now(), interval ? day)
    SQL
    $sth->execute(7);