Subject | Re: Date parameters |
---|---|
Author | Santiago |
Post date | 2003-10-31T02:29:35Z |
Thank you Helen
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 11:10 PM 30/10/2003 +0000, you wrote:used
> >Hi,
> >
> >I have a stored proc that receive date parameters, that will be
> >for a "select" statement.('IMPORTE', '01.01.2005', '01.01.2001')
> >
> >I'm calling the stored proc as:
> >
> >select * from factura_relacion
> >an
> >What is the correct format to specify dates in a function call like
> >this in ISQL ? Is it correct as written?
>
> If it works without an exception, then it is correct. If you get
> exception, it means you need to use CAST(). This depends ondialect. For
> Dialect 3, you may need to do this for date literals:passing
> select * from factura_relacion('IMPORTE', CAST ('01.01.2005' AS
> DATE), CAST ('01.01.2001' AS DATE))
>
>
> >(The next question is a bit Delphi related, and is about the same
> >stored proc function call; sorry for any inconvinience )
> >
> >If I call it from Delphi, should I pass the dates as text, or as a
> >TDate value?
>
> TDateTime, and use the AsDateTime method. This is better than
> literals in Delphi because it avoid the local problems withFirebird's
> non-compatible date literal formats and messing about withEncodeDate and
> DecodeDate.
>
> heLen