Page 1 of 1

expression in trigger

Posted: Tue Jul 13, 2010 2:31 am
by yimwai
when I use system variable @date in expression
Oconv(@DATE,"DDZ")=13
THE condition can be satisfied.
today is 2010-07-13

but when I use sequence job parameter I_DATE
Oconv(I_DATE,"DDZ")=13
here the value of I_DATE is 2010-07-13
but the condition can not be satisfied.

Is there any differences?

Posted: Tue Jul 13, 2010 3:48 am
by priyadarshikunal
How the condition can be satisfied when DDZ returns 13/Bst

@date is internal representation of the date which will return 15535 today and hence the answer is 13/Bst, "DD" will return 13.


In sequence job instead of using oconv() directly on I_DATE, use OConv(IConv(I_DATE, "D-YMD"), "DD") which will return 13 to match the condition.