Formatting Tags
Most email tags can be formatted a specific way by adding formatting information within the tag.
You can add formatting by changing any tag from[Detail.XXXX]to[Detail.XXXX(<type>(<format code>))]
- Supported values for <type> are:
- datetime
- decimal
- integer
- currency *
- sitecurrency
- boolean **
- Supported values for <format code>:
- Standard date/time format codes: http://msdn.microsoft.com/en-us/library/az4se3k1.aspx
- Custom date/time format codes: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
- Standard numeric format codes: http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx
- Custom numeric format codes: http://msdn.microsoft.com/en-us/library/0c899ak8.aspx
*Special “currency” codes:
In addition to standard and custom numeric format codes, you can specify the currency by adding a pipe (or vertical slash) and the currency code, or “SiteCurrency”.
Example: [Detail.Charges(currency(C|SiteCurrency))]
**Special “boolean” codes:
You can specify the actual words to use instead of “True” or “False”.
Example: [Detail.MyCustomBoolField(boolean(Yes|No))]
Date Time Global Tag
The Date Time Global Tag can be used to display the time in a variety of formats.
[#now(DateTime(F))] - The date/time the email notification was generated.
The format string (by default “F”) can be replaced with any standard .Net DateTime format string.
Note:These formats will utilize the email recipient’s selected culture.
Standard Date and Time Format Strings:
- d: 6/15/2008
- D: Sunday, June 15, 2008
- f: Sunday, June 15, 2008 9:15 PM
- F: Sunday, June 15, 2008 9:15:07 PM
- g: 6/15/2008 9:15 PM
- G: 6/15/2008 9:15:07 PM
- m: June 15
- o: 2008-06-15T21:15:07.0000000
- R: Sun, 15 Jun 2008 21:15:07 GMT
- s: 2008-06-15T21:15:07
- t: 9:15 PM
- T: 9:15:07 PM
- u: 2008-06-15 21:15:07Z
- U: Monday, June 16, 2008 4:15:07 AM
- y: June, 2008
Alternatively, a custom format string containing any alphanumeric value, a ‘ ‘ (space), a ‘:’ (colon) or a ‘/’ (forward slash) may be used instead.
Example: The email tag “[#now(DateTime(dd/M/yyyy))]” will result in the value “15/6/2008”
Supported Values:
- Standard date/time format codes: http://msdn.microsoft.com/en-us/library/az4se3k1.aspx
- Custom date/time format codes: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx