on 03-08-2017 5:46 AM
Hi All,
I have a custom OVS based on SADL. After the query is executed and the Items are populated, to validate the records I am checking Today's DateTime in between StartDateTime and EndDateTime.
I have written the following code in the Script of EventHandler "GetValueHelpHandler":
for i in 0..($data.Items.RowCount-1)
$data.Items.Get(i).TodayDateTime = $controller.DateTimeUtils.DateNow()
$controller.DateTimeUtils.DateSub($data.Items.Get(i).EndDateTime, $controller.DateTimeUtils.DateNow(), EndResult )
if ( EndResult < 0 )
$data.Items.Delete(i)
end
end
for i in 0..($data.Items.RowCount-1)
$data.Items.Get(i).TodayDateTime = $controller.DateTimeUtils.DateNow()
$controller.DateTimeUtils.DateSub($controller.DateTimeUtils.DateNow(), $data.Items.Get(i).StartDateTime, StartResult )
if ( StartResult < 0 )
$data.Items.Delete(i)
end
end
As a cross verification, I have put a field in the OVS which is displaying the dateTime in UTC format as for StartDateTime and EndDateTime
And I am facing the issue here. Currently the comparison is not happening or the record is not being deleted from the Items. I need the record to be deleted.
Please suggest.
Thanks,
Srihari.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.