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
Formats a DateTime object to a string that is recognized by Sybase ASE.
Syntax |
$String = $Parser->format_datetime( $DateTime ); |
Input |
|
Return |
|
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 |
|
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 |
|
Return |
|