MWML [DATEDIFF]-Tag

MWML [DATEDIFF]-Tag

Outputs the difference between two points in time.

Usage

Email templates, Landing page templates, Survey templates, Emails, Landing pages, Surveys, Account constants, Dynamic content, Personalization helpers

Syntax

  1. [DATEDIFF ... /]

Attributes

Attribute
Value
Description
format
Text
Format of the date or time. List of all options see strftime()
start
%{<Subscriber-field-ID>}
Relative date/time format
end
%{<Subscriber-field-ID>}
Relative date/time format

Example

Display of the birthday and the years, months, and days that have passed since then.
  1. You were born on [Geburtstag format='date %A, %d.%m.%Y' locale='de_DE' /].<br/>
  2. That was [DATEDIFF start="now" end='%{5}' format='%y years, %m months and %d days' /] ago.

  1. [Geburtstag ... /] includes the content of the subscriber field with the alias "Geburtstag" (Birthday).
  2. start='now' Start time: Now1
  3. end='%{5}' End time: Date from subscriber field "Geburtstag" (ID 5).



1. For mailings: Time of personalization, not delivery.