Dates in browser forms (InfoPath 2010)

I'm building a form to allow users to pass data driven subscription information to a 2008 R2 SSRS instance and the formatting of the date fields is slowing me right down.

If I complete the form in InfoPath (preview) and submit to the SharePoint list then the dates are properly formatted and i can then collect the data from the list into the report subscription but once the form is published and completed in a browser, the date fields are stored with the time tagged on to the end e.g. "01-01-2013T00:00:00"

This obviously screws up the date parameters of the report.

Any suggestions to get around this browser limitation.

I've tried all of the formatting options on the date picker controls.

TIA.

N03L.

July 1st, 2013 5:08pm

If you wanted to discard the last portion "T00:00:00" & display only the dates then the easiest way is to use Calculated Filed. Using calculated field you'll have a chance to parse & display any data "Format" you prefer.  
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2013 7:36pm

Thanks for the info.

I'm already using the translate part of XPath on a hidden field to remove the separators from the date values captured by the date picker.

01/01/2013 = 20130101

I take it I can just use a substring on that same field to only pass the first 8 characters and remove the T00:00:00 from the end?

N03L.

July 2nd, 2013 11:19am

SharePoint doesnt allow date only in a date field, you must include the time, if you do not then it appends the time onto the end for you, to get around this for your purposes, output the date only to a text field, substring-before(myDateAndTimeField, "T") (i.e. this will change 2013-07-02T:00:00:00+01:00:00 into 2013-07-02).
Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2013 12:20pm

Thanks Sergio.

I've finally accepted that there's something going on in the background.
I've deleted and recreated the date fields using the date only option (the originals were created in HSarePoint and then automatically identified as date fields when the form was edited in InfoPath) and that didn't make any difference.

Did you find this out through the same hard fought battle or is this documented somewhere?

Thanks again.

N03L.

July 3rd, 2013 10:44am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics