Ricardo SIGNES > Time-Piece-MSSQL-0.020 > Time::Piece::MSSQL

Download:
Time-Piece-MSSQL-0.020.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.020   Source   Latest Release: Time-Piece-MSSQL-0.022

NAME ^

Time::Piece::MSSQL - MSSQL-specific methods for Time::Piece

VERSION ^

version 0.020

 $Id: MSSQL.pm,v 1.2 2004/10/26 16:55:53 rjbs Exp $

SYNOPSIS ^

 use Time::Piece::MSSQL;

 my $time = localtime;

 print $time->mssql_datetime;
 print $time->mssql_smalldatetime;

 my $time = Time::Piece->from_mssql_datetime( $mssql_datetime );
 my $time = Time::Piece->from_mssql_smalldatetime( $mssql_smalldatetime );

DESCRIPTION ^

This module adds functionality to Time::Piece, providing methods useful for using the object in conjunction with a Microsoft SQL database connection. It will produce and parse MSSQL's default-format datetime values.

METHODS ^

Time::Piece->mssql_datetime

Time::Piece->mssql_smalldatetime

These methods return the Time::Piece object, formatted in the default notation for the correct MSSQL datatype.

Time::Piece->from_mssql_datetime($timestring)

Time::Piece->from_mssql_smalldatetime($timestring)

These methods construct new Time::Piece objects from the given strings, which must be in the default MSSQL format for the correct datatype. If the string is empty, undefined, or unparseable, undef is returned.

FINAL THOUGHTS ^

This module saves less time than Time::Piece::MySQL, because there are fewer strange quirks to account for, but it becomes useful when tied to autoinflation of datatypes in Class::DBI::MSSQL.

AUTHOR ^

Ricardo Signes, <rjbs@cpan.org>

BUGS ^

Please report any bugs or feature requests to bug-time-piece-mssql@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT ^

Copyright 2004-2006 Ricardo SIGNES, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: