Sta: with Dates

Paul Mulroney pmulroney at
Thu Jul 21 05:10:28 UTC 2022

Hi Mats,

In our experience, this line becomes eg 'WHERE invoice_date>='21 JUL 2022', which produces an SQL error when I run this on Postgres.  We created a routine $sqlDate to return the date in quotes in SQL format eg 'yyyy-mm-dd'. Our routine looks like this:

> Sta: WHERE invoice_date>=[iosql.$sqlDate(ld_DateFrom)]


> On 21 Jul 2022, at 11:59 am, ADJob <mats at> wrote:
> Hi,
> I almost never use bind variables. 
> And I avoid use instance variable if I could use a local variable (or Parmeter variable - also local)
>> Sta: WHERE invoice_date>=@[iDateFrom]
> So I do it this way:
> Sta: WHERE invoice_date>=’[lv_DateFrom]’
> /Mats

I told my wife she was drawing her eyebrows too high. She looked surprised.
Paul W. Mulroney                                            We Don't Do Simple Pty Ltd 
pmulroney at       Trading as Logical Developments                   ACN 161 009 374 
Ph: +61 8 9458 3889                                       86 Coolgardie Street
                                                                         BENTLEY  WA  6102

More information about the omnisdev-en mailing list