Skip to Content
0

$controller.DateTimeUtils.DateNow() returns emply rows

Dec 19, 2016 at 10:25 AM

84

avatar image
Former Member

Hi All,

I have created a custom OVS using SADL Query.

At OVS output, I am displaying ID, Description, StartDateTime, EndDateTime and TodayDateTime.

Except TodayDateTime others are being fetched directly from SADL Query.

TodayDateTime field is being populated from script

$controller.DateTimeUtils.DateNow()

Basically purpose of this is to validate records which are valid on current date.

The script code is as below:

result = $controller.DateTimeUtils.dateNow();
for i in 0..($data.Items.RowCount)
$data.Items.Get(i).TodayDateTime = $controller.DateTimeUtils.dateNow();
if($controller.DateTimeUtils.dateSub($data.Items.Get(i).EndDateTime,$data.TodayDate) < 0)
$data.Items.Delete(i);
end
$data.Items.Get(i).TodayDateTime = $controller.DateTimeUtils.dateNow();
if($controller.DateTimeUtils.dateSub($data.TodayDate,$data.Items.Get(i).StartDateTime) < 0)
$data.Items.Delete(i);
end
end

But getting blank value for TodayDateTime in the output.

Please guide,

Thanks,

Sri.

kpvcr.png (11.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers