10 Replies Latest reply: Dec 12, 2017 7:44 AM by Tresesco B RSS

    Load TimeWithZone field from postgres

    Marko Zadravec

      Hi,

       

      I have trouble loading data from postgres field of type TimeWithZone.

       

      I can normally load it, and see it in Data model viewer.

      The problem is when I try to get min(), max() or amy function. It always return NULL.

       

      So let say that I have "time" field in postgres of TimeWithZone type.


      LOAD

           min(time) as start,

           max(time) as stop

      Resident temp_database

      group By id;

       

      Return all null rows.

       

      I even try

       

      LOAD

           min(Time(time)) as start,

           max(Time(time)) as stop

      Resident temp_database

      group By id;

       

      and

       

      LOAD

           min(Time#(time)) as start,

           max(Time#(time)) as stop

      Resident temp_database

      group By id;

       

      I also try

       

      LOAD

           Num(time) as nTime,

           Chr(time) as cTime

      Resident temp_database;

       

      return all null rows.

       

      How to handle this type of fields?