ePages 6.10 - DE_EPAGES/Database/API/DateTimeFormatSybase.pm

Package DE_EPAGES::Database::API::DateTimeFormatSybase

Implements a DateTime parser for Sybase ASE as extension for DateTime::Format::DBI.
Example format string: Dec 1 2003 12:52PM.

Functions

format_datetime
new
parse_datetime

format_datetime

Formats a DateTime object to a string that is recognized by Sybase ASE.

Syntax
$String = $Parser->format_datetime( $DateTime );
Input
$DateTime (object)
a DateTime object
Return
$String (string)
string containing date and time

new

Creates a date and time formatter for the default Sybase ASE datetime format.

Syntax
$Parser = DE_EPAGES::Database::API::DateTimeFormatSybase->new;
Example
my $Parser = DE_EPAGES::Database::API::DateTimeFormatSybase->new;
my $DateTime = $Parser->parse_datetime( 'Dec  1 2003 12:52PM' );
print $Parser->format_datetime( $DateTime );
Return
$Parser (object)
parser/formatter object

parse_datetime

Parses the default date/time format used by Sybase ASE. For an example, type "SELECT convert(varchar(30), getdate(), 109)" in the Sybase isql client.

Syntax
$DateTime = $Parser->parse_datetime( $String );
Input
$String (string)
string containing date and time
Return
$DateTime (object)
a DateTime object