Select Statements using a Formatted Date
- From: denesa.shaw@xxxxxxxxxxxxxxxxxxxxx (Denesa K Shaw)
- Date: Wed, 11 May 2005 07:16:50 -0500
Hi, How do get the date to be in the format like this? mm/dd/yyyy
hh24:mi:ss
When I run this code It prints: START TIME: 01-JAN-05, END TIME:
02-JAN-05
Thanks in advance!
Here is what I have:
my $sql = qq{SELECT MIN(RELOAD_FILE_TS),MIN(RELOAD_FILE_TS)+ 1 FROM
T_RELOAD WHERE LAST_ATTEMPT_TS IS NULL};
my $sth = $dbh->prepare( $sql );
$sth->execute();
my($starttimeStamp,$endtimeStamp);
$sth->bind_columns( undef,\$starttimeStamp,\$endtimeStamp);
##$sth->bind_columns(":fmt","mm/dd/yyyy hh24:mi:ss");
while( $sth->fetch() )
{
print "START TIME: $starttimeStamp, END TIME: $endtimeStamp\n";
}
$sth->finish();
}
.
- Follow-Ups:
- Re: Select Statements using a Formatted Date
- From: Ian Harisay
- Re: Select Statements using a Formatted Date
- Prev by Date: Re: Fetching BIGINT Failed
- Next by Date: Re: Select Statements using a Formatted Date
- Previous by thread: Fetching BIGINT Failed
- Next by thread: Re: Select Statements using a Formatted Date
- Index(es):