12 Replies Latest reply: Sep 23, 2016 5:30 PM by Ralf Becher RSS

    Date format is not working in Where Clause

    Mohammad Sarif

      Hi All,

       

      I have date format with millisecond. I am converting the time into DD-MON-YY and trying to apply this in where clause. But it is not working. Below is my script:

       

      Transaction:

       

      LOAD "CORE_ID",

           TAG3,

          TAG4,

       

          DIRECTION;

      SQL SELECT "CORE_ID",

           TAG3,

          TAG4,

          DIRECTION

       

      //FROM DCCE."SMR_CC_PROCESS" where TAG4 >='22-Sep-16 01.00.45.000000327 AM' ;

       

      FROM DCCE."SMR_CC_PROCESS" where Date(Date#((Left(TAG4,18)),'DD-MMM-YY hh.mm.ss'),'DD-MMM-YY hh.mm.ss') >='22-Sep-16 01.00.45' ;

       

      First clause (commented out) is working fine, however second is not working properly.

      Could you help me on this.

       

      Regards,

      Sarif