3 Replies Latest reply: Oct 25, 2012 9:11 AM by Marcus Ellinghausen RSS

    Date Formatting drive me crazy

      Hi Folks,

       

      another doubt.

       

      I have the TableA

       

      Order     Position     DeliveryDate

      99          10              01/01/2012 00:00:00

       

      I want create another table ( TableB ) with

       

      Order     Position     DeliveryDate

      99          10              01/01/2012 (date type)

       

      My code for download the TableA from the system is:

       

      TableA:

       

      SQL Order,

      Position,

      DeliveryDate FROM Table_from_the_system

       

      My code , wrong, for the table is:

       

      TableB:

       

      Load Order,

      Position,

      date(date#(DeliveryDate,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY') as New_DeliveryDate Resident TableA;

       

      But doesn't work !!

       

      I tried every function...

       

      date(DeliveryDate,'DD/MM/YYYY hh:mm:ss') as New_Deliverydate,

      left(DeliveryDate,10) as New_Deliverydate,

      text(DeliveryDate) as New_Deliverydate,

      date#(left(DeliveryDate,10),'DD/MM/YYYY') as New_Deliverydate,

      date(timestamp(DeliveryDate,'DD/MM/YYYY hh:mm:ss'),'DD/MM/YYYY') as New_Deliverydate,

       

      But ever the result is the character -