IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 11, 2010, 3:13:27 PM (16 years ago)
Author:
rhenders
Message:

added methid to get a formatted date string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/czartool/MySQLDb.pm

    r29280 r29376  
    6464    return $self->{_dbHost};                                                 
    6565}                                                                               
     66###########################################################################
     67#
     68# Adds the provided interval to the provided time
     69#
     70###########################################################################
     71sub getFormattedDate {
     72    my ($self, $time) = @_;
     73
     74    my $query = $self->{_db}->prepare(<<SQL);
     75    SELECT DATE_FORMAT('$time','$self->{_dateFormat}');
     76SQL
     77    $query->execute;
     78
     79    return scalar $query->fetchrow_array();
     80}
    6681
    6782###########################################################################
Note: See TracChangeset for help on using the changeset viewer.