Avoid <error> during data cleansing
Hello, Good Morning.
I hit <error> cells whilst performing an operation that Involves
1. ASDATE
2. SHIFTTIMEZONE
The <error> comes when the originated data column does not contain any String
I tried IF statement, but it gives me an argument error of mixing STRING with DATE.
The outcome I'd like to get to is - for any cells that doesn't have a DATE value, please leave it blank and do not perform the ASDATE or SHIFTTIMEZONE operation. I'd like an outcome that does not contain <error>.
Is this possible please? Thanks.
-
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.
Please sign in to leave a comment.
Comments
7 comments