mercredi 5 juillet 2017

Spotfire IF statement not working when including date functions

I am trying to convert an excel formula for use in spotfire.

In excel =IF(MONTH(A1294)<>MONTH(B1294),(EOMONTH(A1294,0))+1,"") For context =IF(MONTH(Start Time)<>MONTH(End Time),(EOMONTH(Start Time,0))+1,"")

In Spotfire I have a calculated column and I am trying to use the following code but receiving an error "Invalid type for Function call 'If'"

My code is as follows: case when Month([START_TIME_LOCALTIME])!= Month([END_TIME_LOCALTIME]) then Date(Year([END_TIME_LOCALTIME]),Month([END_TIME_LOCALTIME]),1) else '' END

Any help or ideas would be appreciated

Aucun commentaire:

Enregistrer un commentaire