Workflow notification emails

In the Notification message of a workflow, how can I convert <% =Operation.TargetToSet["accountExpires"] %> into a human readable date?

Parents
  • I just tried the following, and it seemed to work for me:

    <%=DateTime.FromFileTime(Convert.ToInt64(Operation.Target["accountExpires"]))%>
    

    Let me know if that helps!

    Cheers,
    Shawn.

    EDIT: Note that this will generate an error when attempting to preview the message since Convert will throw an error since Operation.Target["accountExpires"] returns null/empty in the preview.

Reply
  • I just tried the following, and it seemed to work for me:

    <%=DateTime.FromFileTime(Convert.ToInt64(Operation.Target["accountExpires"]))%>
    

    Let me know if that helps!

    Cheers,
    Shawn.

    EDIT: Note that this will generate an error when attempting to preview the message since Convert will throw an error since Operation.Target["accountExpires"] returns null/empty in the preview.

Children