How can i pass date in where condition of ODBC query. I tried Select * from [tablename] where $date > 20181201 Select * from [tablename] where $date > 01122018 Select * from [tablename] where $date > '01122018' none of them are working. Please help. Thanks
i am not asking where to run it. My issue is "date" field. Whatever i type in "date" field, it does not return anything in result.
use tdl function $$Date to convert string to date : Select * from [tablename] where $date > $$Date:"2018-12-01" the environment where you are executing the query will also have an effect
suppose following is my TDL file then where do i write $$date ;;The Collection TDL [Collection : All Vouchers] Type : Voucher Fetch : Date, VoucherNumber, Reference, VoucherTypeName, LedgerName, Narration, PartyLedgerName, Amount ;;EOF()
;;The Collection TDL [Collection : All Vouchers] Type : Voucher Compute:date :$$Date:$Date Fetch : Date, VoucherNumber, Reference, VoucherTypeName, LedgerName, Narration, PartyLedgerName, Amount ;;EOF()
worked well with one changes. as you advised Select * from [tablename] where $date > $$Date:"2018-12-01" but Select * from [tablename] where $date > $$Date:"20181201" it accept yyyymmdd (not yyyy-mm-dd)