Combine Date and Time Fields to Submit to A SharePoint List Date and Time Column - InfoPath Dev
in

InfoPath Dev

Combine Date and Time Fields to Submit to A SharePoint List Date and Time Column

Last post 03-20-2014 08:29 AM by pitt23panther. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-20-2014 07:34 AM

    Combine Date and Time Fields to Submit to A SharePoint List Date and Time Column

    Hello all - I have an InfoPath 2010 Form that has 2 fields - one is of type Date, and the other is of type Time. I am submitting the form to a SharePoint list, and would like to combine these 2 fields into a single date/time value to submit to a DateAndTime column in my SharePoint List. I have tried several ways to concatenate the 2 fields, but none seem to work. I started with a simply concat like this: concat(Date, "T", "Time") ...without any luck. My current attempt is: concat(msxsl:format-date(Date, "M/d/yyyy"), msxsl:format-time(Time, " h:mm tt")) But the submit fails when the SharePoint List to which I am trying to submit has a column data type of Date and Time. If I instead change its data type to Single Line of Text, it works - and it looks like a perfect date/time. Do/can I cast this concatenation to a Date datatype before submitting somehow? Thanks!
  • 03-20-2014 08:29 AM In reply to

    Re: Combine Date and Time Fields to Submit to A SharePoint List Date and Time Column

    I was able to resolve the issue utilizing this useful blog post: http://blog-sharepoint.blogspot.com/2009/07/infopath-caml-date-time-format-in-when.html
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.