[Haskell-cafe] Re: programmatic DB interface?

Michael Snoyman michael at snoyman.com
Fri Feb 5 08:01:52 EST 2010

On Fri, Feb 5, 2010 at 10:55 AM, Johannes Waldmann <
waldmann at 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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100205/d37c4340/attachment.html

More information about the Haskell-Cafe mailing list