Subject Re: [firebird-support] how to insert DATE in a different format?
Author Helen Borrie
At 12:19 AM 30/06/2005 -0700, you wrote:
>Thanks Helen, that explains it very well.
>
>The reason I was asking is that in a Windows Forms
>application the datetimepicker control returns the
>date selected as a string in the dd/mm/yyyy format. I
>was hoping to pass this value directly down to my data
>access layer without any modifications. But realizing
>that a datetimepicker control returns locale dependant
>literals, I now think it wouldn't be a good idea
>anyway.
>
>Just out of curiosity, is there any document that
>lists the legitimate literals that can be used for FB
>DATEs?

Most of them are listed in the IB 6 beta Data Definition Guide
(DataDef.pdf). The Firebird Book has a whole section on them.

>Or is there a numerical representation of DATEs
>that can be used across different databases? A value
>that I could compute in the application and pass to
>whichever database I'm using? (assuming I could work
>with numerical values for DATEs in my interaction with
>the database, otherwise this would be irrelevant)

No. There is no interface for this. The API has date encoding and decoding
functions. If possible, use an interface that surfaces these functions and
enables you to parameterise date/time data.

Helen