17-01-20 11:29 AM
20-01-20 08:45 AM
20-01-20 03:01 PM
20-01-20 03:37 PM
20-01-20 06:39 PM
Private Function ConvertDateTimeToText(ByVal Table As DataTable) As DataTable Dim Result As New DataTable For Each Column As DataColumn In Table.Columns If Column.DataType = GetType(DateTime) Then Result.Columns.Add(Column.ColumnName, GetType(String)) Else Result.Columns.Add(Column.ColumnName, Column.DataType) End If Next For Each Row As DataRow In Table.Rows Dim NewRow As DataRow = Result.NewRow() For Each Column As DataColumn In Table.Columns If Column.DataType = GetType(DataTable) Then NewRow(Column.ColumnName) = ConvertDateTimeToText(Row(Column.ColumnName)) Else NewRow(Column.ColumnName) = Row(Column.ColumnName) End If Next Result.Rows.Add(NewRow) Next Return Result End Function
result = ConvertDateTimeToText(ConvertToDataTable(json))
21-01-20 08:37 AM
19-07-21 09:29 AM
Internal : Could not execute code stage because exception thrown by code stage: Unable to cast object of type 'System.String' to type 'System.Data.DataTable'.
02-08-21 06:48 AM
02-08-21 08:56 PM
04-08-21 03:19 PM
Private Function DeserialiseGeneric(ByVal o As Object, ByVal populate As Boolean) As Object
Dim a As JArray = TryCast(o, JArray)
If a IsNot Nothing Then
Return DeserialiseArray(a, populate)
End If
Dim jo As JObject = TryCast(o, JObject)
If jo IsNot Nothing Then
Return DeserialiseObject(jo, populate)
End If
Dim jv As JValue = TryCast(o, JValue)
If jv IsNot Nothing Then
If GetTypeOf(jv.Value) = GetTypeOf(datetime) Then
Return jv.Value.ToLocalTime()
Else
Return jv.Value
End if
End If
Return JSON.Null
End Function