Avoid <error> during data cleansing

Comments

7 comments

  • Konsta Danyliuk

    Hello Anson.
    It seems the formula you are using in the Attachment_AttachTime_Asia_DATE column can't handle empty values as the arguments.

    Do you think you could provide this formula from the Attachment_AttachTime_Asia_DATE column?

    0
    Comment actions Permalink
  • Anson Chan

    Hello Konsta, the formula I was using from Attachment_AttachTime_Asia_DATE was SHIFTTIMEZONE.

    Shifting time from UTC to Asia time

    thanks, Anson

    0
    Comment actions Permalink
  • Konsta Danyliuk

    Hello Anson.
    May I ask you to provide the whole formula, please. I need to see what columns it uses as arguments.

     

    0
    Comment actions Permalink
  • Anson Chan

    Hello Konsta,

    Please find the below

    SHIFTTIMEZONE(#Attachment_AttachTime_UTC_DATE;"Asia/Manila";"Etc/UTC")

    Thanks,

    Anson

    0
    Comment actions Permalink
  • Konsta Danyliuk

    Thank you, Anson.

    The SHIFTTIMEZONE function can't be applied to an empty value. This is the reason why you are getting <error> for those records where the #Attachment_AttachTime_UTC_DATE column is null. I guess if you hover over the errored cell, you will see the "argument of function SHIFTTIMEZONE is null" error message.

    Thereby you need to perform an emptiness check first and then apply SHIFTTIMEZONE to the records that have values only.

    For example, the following formula checks if the value in the #Attachment_AttachTime_UTC_DATE column is null and then returns the same empty value when true or applies SHIFTTIMEZONE when false.

    IF(ISNULL(#Attachment_AttachTime_UTC_DATE); #Attachment_AttachTime_UTC_DATE; SHIFTTIMEZONE(#Attachment_AttachTime_UTC_DATE;"Asia/Manila";"Etc/UTC"))

    I hope this helps.

    0
    Comment actions Permalink
  • Anson Chan

    Thank you Konsta, it worked! much appreciated for your guidance, always.

    Kind Regards, Anson

    0
    Comment actions Permalink
  • Konsta Danyliuk

    You are welcome, Anson.

    0
    Comment actions Permalink

Please sign in to leave a comment.