AMPscript Format Functions

AMPscript DateTime functions allow us to manipulate display format, perform math functions, and control email content using static, dynamic, and real-time values. Formatting functions provide a powerful tool set for converting various data types to formatted strings and numbers.

  • FormatDate(1, 2, 3, 4)
  • FormatCurrency(1, 2, 3, 4)
  • FormatNumber(1, 2, 3)
  • Format(1, 2, 3, 4)

Format Date Function

This function formats a specified string as a date value for a specified format pattern and locale.

Example
%%=FormatDate(1, 2, 3, 4)=%%


Format Currency Function

This function formats a specified string as a currency value for a specified locale.

Example
%%=FormatCurrency(1, 2, 3, 4)=%%


Format Number Function

This function formats a specified string as a number for a specified locale.

Example
%%=FormatNumber(1, 2, 3)=%%


Format Function

This function formats a string into a specified format pattern and locale. You’ll want to use this function for date and time formatting that requires a locale setting.

Example
%%=Format(1, 2, 3, 4)=%%


Gallery