I am trying to submit the contents of a repeating table in an InfoPath form to a new SharePoint list. Everything works well until I try and manipulate one of the date fields.
I have a Date Picker “DateEnd” with a data type of text and a format of dd/mm/yyyy.
If I pass the date as shown below everything is fine
Dim PickEnd As String = rows.Current.SelectSingleNode("my:PickEnd", NamespaceManager).Value
However what I need to do is add 24 hours to the time. So as a test I have tried all of the following options.
'**NO RESULT 1
Dim PickEnd As Date = rows.Current.SelectSingleNode("my:PickEnd", NamespaceManager).Value
'**NO RESULT 2 Dim x As Date = CType(rows.Current.SelectSingleNode("my:PickEnd", NamespaceManager).Value, Date) Dim PickEnd As String = x
'**NO RESULT 3 Dim PickEnd As String = CType(rows.Current.SelectSingleNode("my:PickEnd", NamespaceManager).Value, Date)
'**NO RESULT 4
Dim Workdate As Date
Workdate = rows.Current.SelectSingleNode("my:PickEnd", NamespaceManager).Value
Workdate = Workdate.AddSeconds(1)
PickEnd = Workdate.ToString
In saying “NO RESULT”, I get no data in my new list. How can I manipulate the date prior to sending it to the list? The “PickEnd” field in the new list is defined as Date/Time. |