Subject | Re: [firebird-support] Re: Problems selecting on Timestamp. |
---|---|
Author | Helen Borrie |
Post date | 2011-11-09T10:32:14Z |
At 11:04 PM 9/11/2011, Mark Rotteveel wrote:
./heLen
>On Wed, 09 Nov 2011 09:59:23 -0000, "tomsee7" <tomconlon7@...>Yes. As is '11/06/2011' - as the OP picked up from my *typo*. That is valid for dates in the US (mmddccyy) date format. '11.06.2011' is used for the International English (ddmmccyy)date format.
>wrote:
>> Also, '30-Jun-2011 08:35:26' is explicit and unambiguous.
>
>Is it?
>Technically it is locale-dependent conversion as well.Technically it's not. It's not locale-dependent and it's not (in most contexts) a conversion but encoding of recognised literal formats. The fact that it uses English abbreviations for calendar months is not due to locale but to a xenophobic implementation.
>I am not sure if Firebird supports this US-locale conversion in all locales, and you would also need to make sure that your application will behave in allFirebird doesn't support "locale conversion" at all. It takes what you give it and rejects it if it has a rule that says it's invalid.
>locales it will run in and supply a correctly formatted string.
>Even better of course would be to simply use a parametrized query whichDefinitely parameters are best practice for date/time literals. Don't call the literal encoding "string conversion", though.
>assigns a timestamp value (eg java.sql.Timestamp in JDBC), instead of using
>string conversions.
./heLen