Case when and timstampdiff formula
Hi,
I want to use CASE WHEN to make a timstampdif result show as 1 if the difference between dates is 0, otherwise run the timestampdiff as usual.
I put in the forumla:
CASE WHEN TIMESTAMPDIFF(SQL_TSI_DAY, "- Service Request Custom Attributes".DATE_0, "- Service Request Custom Attributes".INDEXED_DATE_0)='0' THEN '1' ELSE TIMESTAMPDIFF(SQL_TSI_DAY, "- Service Request Custom Attributes".DATE_0, "- Service Request Custom Attributes".INDEXED_DATE_0) END
But that caused an error, and when I put quote marks around it, it doesnt run the formula it just puts is as text.
Any help or ideas?
I want to use CASE WHEN to make a timstampdif result show as 1 if the difference between dates is 0, otherwise run the timestampdiff as usual.
I put in the forumla:
CASE WHEN TIMESTAMPDIFF(SQL_TSI_DAY, "- Service Request Custom Attributes".DATE_0, "- Service Request Custom Attributes".INDEXED_DATE_0)='0' THEN '1' ELSE TIMESTAMPDIFF(SQL_TSI_DAY, "- Service Request Custom Attributes".DATE_0, "- Service Request Custom Attributes".INDEXED_DATE_0) END
But that caused an error, and when I put quote marks around it, it doesnt run the formula it just puts is as text.
Any help or ideas?
0