Michael Higgins wrote:
> The error I was getting is: Invalid date format: 2008-01-14 00:00:00.000
>
> So, maybe this should be: return $type->new( pattern => '%m/%d/%Y
> %H:%M:%S.%N' ); ???
>   
You should be able to set this by doing:

    $schema->storage->datetime_parser->pattern('%m/%d/%Y %H:%M:%S.%3N');

this will obviously only work if the datetime parser is really a
DateTime::Format::Strptime object.

> I've added the sub as above, with the nanosecond string,
> to ::DBI::ODBC::Microsoft_SQL_Server.pm and set it explicitly in my
> script.
>
> My classes look like => {accessor=>'order_date',data_type =>
> 'datetime'},
>
> If I set the storage type in my script, then call ->ensure_connected,
> it deletes the key I set:
>   
What happens if you call ensure_connected first? The storage type is
normally determined when the connection is first made, so it figures
that it is overwritten if you set it before connecting.


Matt


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]

Reply via email to