I am using fn!cdtcomparison() function to find difference between two cdts. However, the result is converting date attribute to text with format 'yyyy-mm-dd hh:mm:aa'.
Can someone tell me how to detect and reformat it to datetime it in as it can be any attribute within the cdt.
Discussion posts and replies are publicly visible
Hello TJ,
Below code is sample for you, hope this will help.
a!forEach( items: cdtcomparison( {dateOne: now()}, {dateOne: now()+1} ), expression: { if( fv!item.attributeName = "dateOne", { attributeName: fv!item.attributeName, isDifferent: fv!item.isDifferent, previousValue: text( fv!item.previousValue, "MM/DD/YYYY HH:MM" ), currentValue: text( fv!item.currentValue, "MM/DD/YYYY HH:MM" ) }, fv!item ) })
TJ, is above code work for you?