Last active
September 30, 2025 22:01
-
-
Save wvpv/0db9f20af37945e9dee84e647b148139 to your computer and use it in GitHub Desktop.
SFMC-AMPscript-Truncate-Decimal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
set @num1 = 12.99 | |
set @num1_rounded = Format(@num1, "N0") | |
set @num1_formatted = @num1_rounded | |
if @num1_rounded > @num1 then | |
set @num1_formatted = subtract(@num1_rounded, 1) | |
endif | |
]%% | |
num1: %%=v(@num1)=%% | |
<br>num1_rounded: %%=v(@num1_rounded)=%% | |
<br>num1_formatted: %%=v(@num1_formatted)=%% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment