[Mono-devel-list] Error converting datetime to string
Rafael Teixeira
monoman at gmail.com
Thu Nov 4 14:17:41 EST 2004
Why should you change the datestyle returned from the database, as it
will be converted to a DateTime, that you'll need to reformat for
display anyway? I think datestyle changes aren't supported.
In portuguese:
Oi Jurandy, temos que confirmar com o Francisco, mas acho que ele
assume que os dados sempre virão no formato padrão do banco. Como
disse não é legal pedir pro banco fazer uma coisa que você vai
desperdiçar e refazer em seguida.
Grande abraço,
On Thu, 4 Nov 2004 15:14:21 -0200, Jurandy Martins Soares Junior
<jurandy at lsd.ic.unicamp.br> wrote:
> Hi,
>
> I'm developing an application with Mono/XSP, and using Postgresql as a
> database. I've worked with Npgsql.
>
> Well, it's worked fine til I decided to play a little with datestyle. After
> the first try, the system crashed showing the message below.
>
> To be straight, before the sql command was ( 1) "SELECT * FROM junta", then
> I've changed it to ( 2) "SET DateStyle TO european; SELECT * FROM junta".
>
> Maybe it's a newbie question, but what is easiest way to play with datestyle?
>
> Regards,
> Jurandy Martins
> -----------------------------------------------------------------------------
> Server error in '/mono' application
> Description: Error processing request.
>
> Error Message: HTTP 500.
>
> Stack Trace:
>
> System.FormatException: Invalid format.
> in [0x00055] (at /cvs/1-mono/mcs/class/corlib/System/DateTime.cs:1314)
> System.DateTime:ParseExact
> (string,string[],System.IFormatProvider,System.Globalization.DateTimeStyles)
> in [0x00133]
> (at /cvs/1-mono/mcs/class/Npgsql/NpgsqlTypes/NpgsqlTypesHelper.cs:313)
> NpgsqlTypes.NpgsqlTypesHelper:ConvertBackendStringToSystemType
> (System.Collections.Hashtable,string,int,int)
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
--
Rafael "Monoman" Teixeira
---------------------------------------
Just the 'crazy' me in a sane world, or would it be the reverse? I dunno...
More information about the Mono-devel-list
mailing list