Hi have json like below
[
{
“id”: 309767,
“testExecKey”: “TEST81313-1307”,
“testKey”: “TEST81313-1287”,
“status”: “EXECUTING”,
“type”: “Manual”,
“start”: “2023-05-24T07:46:18+02:00”,
“executedBy”: “rupmore”,
“defects”: ,
“evidences”: [
{
“filename”: “CAP-66666.csv”,
“contentType”: “text/csv”,
“data”: “https://e-3d-jira2.capgemi****chment/219483/CAP-66666.csv”
}
],
“steps”: [
{
“status”: “TODO”,
“defects”: ,
“evidences”:
},
{
“status”: “TODO”,
“defects”: ,
“evidences”:
}
],
“assignee”: “rupmore”,
“testEnvironments”: ,
“iterations”: ,
“comment”: “Test case is aborted”
},
{
“id”: 309768,
“testExecKey”: “TEST81313-1307”,
“testKey”: “TEST81313-1288”,
“status”: “EXECUTING”,
“type”: “Manual”,
“start”: “2023-05-24T07:46:13+02:00”,
“executedBy”: “rupmore”,
“defects”: ,
“evidences”: ,
“steps”: ,
“assignee”: “rupmore”,
“testEnvironments”: ,
“iterations”:
}
]
here 2 start dates are there.
1]2023-05-24T07:46:18+02:00
2] 2023-05-24T07:46:13+02:00
steps i am doing -
desrialize json and storing in “jrez” variable
to acess start date i am doing - " ““start””:“”“+Jrez(Counter4)(“start”).Value(Of DateTime).ToString(“yyyy-MM-ddTHH:mm:ssk”)+”“”“+”,"
consider value of counter 4 is o
means only from below block
{
“id”: 309767,
“testExecKey”: “TEST81313-1307”,
“testKey”: “TEST81313-1287”,
“status”: “EXECUTING”,
“type”: “Manual”,
“start”: “2023-05-24T11:16:18+05:30”,
“executedBy”: “rupmore”,
“defects”: ,
“evidences”: [
{
“filename”: “CAP-66666.csv”,
“contentType”: “text/csv”,
“data”: “https://e-3d-jira2.capgemi****chment/219483/CAP-66666.csv”
}
],
“steps”: [
{
“status”: “TODO”,
“defects”: ,
“evidences”:
},
{
“status”: “TODO”,
“defects”: ,
“evidences”:
}
],
“assignee”: “rupmore”,
“testEnvironments”: ,
“iterations”: ,
“comment”: “Test case is aborted”
}
which wil return 2023-05-24T07:46:18+02:00 - expected
as i am appending in json file using append line and using above expression
" ““start””:“”“+Jrez(Counter4)(“start”).Value(Of DateTime).ToString(“yyyy-MM-ddTHH:mm:ssk”)+”“”“+”,"
it writing date correct but time it is taking wrong it is writing
2023-05-24T11:16:18k - i am getting
i am running this on VM where datetime is different than local machine.
How can i get exact date.
update me if you have any query reagrding requirement.
You can find below input and expected output file.
TEST81313-1307 Input.json (1.1 KB)
TEST81313-1307 Output.json (1.2 KB)
@Silviu @devashish1989 @bcorrea @marian.platonov @Josh_James @vaishnavi_baradkar



