Skip to main content
August 17, 2022
Question

Rule to CDT

  • August 17, 2022
  • 19 replies
  • 0 views

Hi All,

I am using read excel function to read the excel file and mapping these values to CDT.

I am giving timestamp field in excel and trying to map with CDT having data type 'Date and Time', and in postgres Db it has timestamp field, but it is not getting mapped to CDT.

NOTE: If I enter only Date then it is getting mapped to CDT and updating the DB, but If I am trying with timestamp field the CDT values are null.

 

Thanks,

Kiran

    19 replies

    harshitb6843
    August 17, 2022

    Hi Kiran, 

    Can you also attach a screenshot of the mapping rule/code you are using to task this dict to CDT? 
    To me, it looks like you might need to change the format of the date, or maybe the datatype of the field in CDT is misconfigured. 

    August 17, 2022

    Hi Harshit,

    Format of the date is fine, whenever I add (8/17/2022 10:10:00) then the file is read by rule but the mapping is not happening for any values to CDT

    harshitb6843
    August 17, 2022

    I need to see how you have configured the casting expression rule. Please attach the code or screenshot of it. 

    August 17, 2022

    You have to use toDatetime function to cast it into Date and Time type.

    August 18, 2022

    Hi deepak,

    I try to cast the values as per CDT but giving this error. I am passing date as MM-DD-YYYY HH:MM:SS AM/PM.

    NOTE: I am using postgres DB

    August 18, 2022

    you have to modify the date format first and then use todatetime. for that you have to see your local variable data.