Subject | Re: [firebird-support] Date parameters |
---|---|
Author | Helen Borrie |
Post date | 2003-10-30T23:32:03Z |
At 11:10 PM 30/10/2003 +0000, you wrote:
exception, it means you need to use CAST(). This depends on dialect. For
Dialect 3, you may need to do this for date literals:
select * from factura_relacion('IMPORTE', CAST ('01.01.2005' AS
DATE), CAST ('01.01.2001' AS DATE))
literals in Delphi because it avoid the local problems with Firebird's
non-compatible date literal formats and messing about with EncodeDate and
DecodeDate.
heLen
>Hi,If it works without an exception, then it is correct. If you get an
>
>I have a stored proc that receive date parameters, that will be used
>for a "select" statement.
>
>I'm calling the stored proc as:
>
>select * from factura_relacion('IMPORTE', '01.01.2005', '01.01.2001')
>
>What is the correct format to specify dates in a function call like
>this in ISQL ? Is it correct as written?
exception, it means you need to use CAST(). This depends on dialect. For
Dialect 3, you may need to do this for date literals:
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 sameTDateTime, and use the AsDateTime method. This is better than passing
>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?
literals in Delphi because it avoid the local problems with Firebird's
non-compatible date literal formats and messing about with EncodeDate and
DecodeDate.
heLen