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.

Print | posted on Wednesday, January 28, 2009 3:58 PM

Feedback

# re: Modifying Date Formats in SharePoint Designer Workflows

Left by Jerry at 2/15/2009 5:29 PM
Gravatar Can you do this without InfoPath?

# re: Modifying Date Formats in SharePoint Designer Workflows

Left by David Gerhardt at 2/16/2009 12:13 PM
Gravatar Hi, Jerry.

Here is a related forum topic...

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_24084201.html

"bhand" had a suggestion that might work for you.

Regards,
David

# re: Modifying Date Formats in SharePoint Designer Workflows

Left by NH at 4/19/2009 3:31 AM
Gravatar WORK FLOW INFOPATH SHAREPOINT DESIGNER
SHAREPOINT SERVER
Comments have been closed on this topic.

Copyright © David Gerhardt

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski