Subject Re: [ib-support] Extract & SP
Author Helen Borrie
At 06:04 PM 21-11-01 +0200, Burak wrote:
> Should I procedure that converts the date in dd/mm/yyyy to mm/dd/yyyy or
>only
>CAST( Variable as DATE) 'll be enough for the operation

CAST won't work with an invalid date literal, so a server-based procedure won't do it. Unfortunately, you have to fix this at the client.

From long experience with Borland's US-centric date literal formats in their databases AND their development tools, I'd seriously recommend that you either

1) parse EVERY user-entered date at the client and massage it into a recognised literal format before it reaches your DML statement
or
2) have users enter dates in a recognised literal format

It's a VERY good idea to avoid a slash-separated format altogether in your UI, if your users are accustomed to dates in dd/mm/yy format (which most users are, everywhere in the world except the United States) - it's just too easy to miss a date like 23/3/2001.

Helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________