【问题标题】:Personalisation string to display a date 14 days after end date in Netsuite在 Netsuite 中显示结束日期后 14 天的日期的个性化字符串
【发布时间】:2021-01-09 05:05:13
【问题描述】:

我正在寻找 Netsuite 电子邮件的个性化字符串/ampscript,我希望它在其中显示结束日期后 14 天的日期。

因此,如果结束日期是:2020 年 9 月 23 日 - 它应该显示的日期是:2020 年 10 月 7 日

对此有什么建议吗?对 Netsuite 电子邮件很陌生。

【问题讨论】:

  • 不记得 NetSuite 在电子邮件模板中使用 AMPscript。在 NetSuite 脚本模板中使用过 FreeMarker。在 NetSuite 帮助中查找这些术语以开始使用。还有一个Apache FreeMarker 在线参考。

标签: email netsuite personalization


【解决方案1】:

您可以将日期转换为 long 并在该日期上加上毫秒以获得未来日期。

https://freemarker.apache.org/docs/ref_builtins_expert.html#ref_builtin_numTypehttps://freemarker.apache.org/docs/ref_builtins_expert.html#ref_builtin_numToDate

很喜欢:

<#assign startDate = record.trandate?long/>
<#assign futureTime = startDate + 14 * 86400000/><!-- ms per day -->
<#assign afterDate = futureTime?number_to_date/>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-09
    • 1970-01-01
    相关资源
    最近更新 更多