i'm trying to substring a value (money 1000.99). I want to take everything before the .99 and the take everything after the 1000. also the value could be anything ie 100.00, 1100.00
I have tried this but not quite working
%%[
SET @NCBestPrice1 = NCBestPrice1
SET @NCBestPrice1Fix = FormatNumber(@NCBestPrice1fix,"F2")
SET @NCBestPrice1Pounds = Substring(@NCBestPrice1fix, 0, Subtract(Length(@NCBestPrice1fix),3))
SET @NCBestPrice1Pence = Substring(@NCBestPrice1fix,Add(Length(@NCBestPrice1Pounds),1), 3)
]%%
Getting this error:
Unable to generate preview A scripting error has occurred. An error occurred when attempting to evaluate a FormatNumber function call. The input value () cannot be formatted as a number. The first parameter value for a FormatNumber call must be a numeric type supported by the requested format. Value: Format: F2
The Data extension field is Text(100).
Any help is appreciated.
SET @NCBestPrice1Fix = FormatNumber(@NCBestPrice1fix,"F2")
be this:SET @NCBestPrice1Fix = FormatNumber(@NCBestPrice1 ,"F2")
?