[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: passing date-variable as a parameter to procedure



On Wed, 28 Apr 1999, Reinier de Ruiter wrote:

> Is there anybody who has successfully passed a date-variable as a parameter
> to a procedure ? I am using sqr 4.3.2
> I have a variable defined as a date in de declare-variable block. When I try
> to pass it to a procedure it appears to be changed into a string with only
> the date in it, and not the time.
> Right now I work around it by converting to a string before passing to the
> procedure. Is this a bug ?

No, this is a feature!  :)

The variable in your procedure is a local variable and is defaulting to a
string, so the date gets "auto-converted" to match the type. Put another
declare-variable block in the beginning of your procedure and declare the
parameter variable as a date. This should solve your problem.

HTH,
-----------------------------------------------------------------------
Donald Mellen  | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/
donm@ontko.com |  "In the beginning, there was nothing, which exploded"