0

I have a drop down in an InfoPath form that grabs data from a SharePoint list. One of the fields in the form is a date field and when it gets populated with the date from SharePoint it includes the time stamp.

It looks like this: 2016-01-01T00:00:00

I have the formatting set on the field as "3/14/2001". How can I remove the "T00:00:00"?

  • I added "substring-before" to the function in the rule and extracted just the date! – wahle509 Jan 28 '16 at 18:20
  • Really consider using a library like Moment.js. It will format in desired result :) – Ankur Jan 28 '16 at 19:12
1

Figured it out without any custom code! I just added this to the function:

substring-before(field1, "T")

This extracted all the text before the "T"!

  • Really consider using a library like Moment.js. It will format in desired result :) – Ankur Jan 28 '16 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.