Format Date in InfoPath form in SharePoint 2013

Format Date in InfoPath form in SharePoint 2013

In this InfoPath SharePoint tutorial, I am going to explain how to format date in InfoPath 2013 in SharePoint 2013/2016/Online. I will show how we can format date which returns from an inbuilt function like Date() or now().

Recently I got a requirement to display the current date in a single line of textbox based on some rules. For this requirement, you can use the InfoPath inbuilt function known as today() or now(). But here we will see how we can format the date from the default format yyyy-mm-dd to mm-dd-yyyy.


By default if you will try to populate current date by using Date() function in InfoPath 2013, it will appear in yyyy-mm-dd like below:

 Format Date in InfoPath form in SharePoint 2013
Format Date in InfoPath form in SharePoint 2013

But you can do some string manipulation if you want to have in a different format like mm-dd-yyyy or dd-mm-yyyy.

Below is an example:

concat(substring(today(), 6, 2), “/”, substring(today(), 9, 2), “/”, substring(today(), 1, 4))

concat(substring(now(), 6, 2), “/”, substring(now(), 9, 2), “/”, substring(now(), 1, 4))

Now after this string manipulation the date will appear like below:

infopath date format dd-mm-yyyy
Format Date in InfoPath form in SharePoint 2013

You may like following InfoPath SharePoint tutorial below:

Hope this will be helpful to format a date in InfoPath 2013/2016/Online.

Check out Best Alternative to InfoPath -> Try Now

EnjoySharePoint YouTube Channel

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →