I have the following formula but keep getting error for 'Then missing'. Please advise where to insert 'Then'
If ({Command.DATA_TYPE_CD}="D" );
FormatDate(ToDate(FormatNumber({Command.BEFORE_VALUE_NO};"000000");"MMddyy"); "dd-MMM-yyyy");
FormatNumber({Command.BEFORE_VALUE_NO};"$#,###.#0"))
If ({Command.DATA_TYPE_CD}="D" );
FormatDate(ToDate(FormatNumber({Command.BEFORE_VALUE_NO};"000000");"MMddyy"); "dd-MMM-yyyy");
FormatNumber({Command.BEFORE_VALUE_NO};"$#,###.#0"))