Help for this page

Select Code to Download


  1. or download this
    my $query = <<"ESQL";
    SELECT * FROM $table
    ...
          and $start_time_field between ? and ?
          or $end_time_field between ? and ?
    ESQL
    
  2. or download this
    use Time::Local;
    # . . .
    
  3. or download this
    my @datetime_start = $date1 =~ /\d+/g;
    $#datetime_start = 5;  # expand to six elements,
    ...
    my @datetime_end = $date2 =~ /\d+/g;
    $#datetime_end = 5;    # expand to six elements,
                           # even if there are only three
    
  4. or download this
    my $datetime_start = timelocal reverse @datetime_start;
    my $datetime_end   = timelocal reverse @datetime_end;