Modifying Date Formats in SharePoint Designer Workflows

You may have noticed that you cannot modify date formats with out-of-the-box SharePoint Designer workflow functionality. As a result, when you look up a date field in the message body of a Send an Email action, the date will get displayed as “1/28/2009 12:00:00 AM” in the message that is sent to the user.

If the workflow is attached to a form library, there is a codeless workaround that you could implement from within the InfoPath form designer. Just add a rule for your dateTime node (or date node) that re-formats the value to a string node. Use one of the declarative substring functions to modify the format accordingly. In the case of a dateTime node, you may want to use the substring-before function to capture everything that precedes the “T”, as shown in the following figure.

Modifying the Date Format

When publishing the form template back to the library, be sure to promote the string node that contains the modified date format. Then, in the SharePoint Designer workflow, you can perform a lookup for the string node.

3 thoughts on “Modifying Date Formats in SharePoint Designer Workflows

Comments are closed.