Hi all,
I need to extract the current hour and minute, and store it in a variable to make a comparison on a sql query.
I have done the following
this gives the value that I need but right aligned, which is not good because the value I am comparing it to is left aligned, and won't make proper comparisons. Is there a better way to do this?
I tried variable * 100 i.e. EDITime = EDITime * 100, and it will give the correct value but it is still not making the comparison that I need, so I am guessing it is not the correct way to do it? (also it is not very intuitive).
the field I need to compare it to is a zoned length 6, so I declared EDITime also as zoned length 6, (DCL-S EDITime zoned(6:0) inz
I need to extract the current hour and minute, and store it in a variable to make a comparison on a sql query.
I have done the following
Code:
EDITime = %int(%char(CurrentHr - 1) + %trim(%char(CurrentMn)));
I tried variable * 100 i.e. EDITime = EDITime * 100, and it will give the correct value but it is still not making the comparison that I need, so I am guessing it is not the correct way to do it? (also it is not very intuitive).
the field I need to compare it to is a zoned length 6, so I declared EDITime also as zoned length 6, (DCL-S EDITime zoned(6:0) inz
Comment