On Fri, Feb 5, 2010 at 10:55 AM, Johannes Waldmann <
waldm...@imn.htwk-leipzig.de> wrote:

> > and then read with my own parse string:"%Y-%m-%d %T%Q"
> > This seems to work just fine.
>
> Thanks. - When I'm using that format string, I get:
>
> Convertible: error converting source data SqlLocalTime 2008-10-29 00:00:00
> of type SqlValue to type Data.Time.LocalTime.LocalTime.ZonedTime:
> incompatible types
>
> I guess I need to find out who wants ZonedTime.
>
> In my DB description (generated by dbdirect),
> the only time-related type is CalendarTime.
>
> J.
>
>
> Did you append an empty string in the SELECT statement? If you append the
empty string (||''), HDBC treats the field as text and so returns a
SqlByteString. However, if you do not append the empty string, it treats the
field as a timestamp and tries to convert it before it even reaches your
code.

All of this is just speculation, of course, since I haven't actually looked
at the code. But my "extensive" (ie, 5 minute) testing implies it to be
true.

Michael
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to