创建新话题
已回答

Comparing a date attribute with current date

I have a problem with my grid script. I want to compare a date (@ABCDATE - a part attribute of type Date) with the current date to decide if an item is “in effect” or not.


最佳答案

Thanks for your question. Below is a simple example of this in a Report configuration. 


<Report>

<Text>#{? isEffective(@DDAT, @SA0073 )}</Text>

  <Function name="isEffective" as="Boolean">
    <Parameter name="date1" as="Date"/>
    <Parameter name="date2" as="Date"/>
    <Value select="if $date1 &lt; $date2 then true else false "/>
  </Function>

</Report>



1 Comment

回答

Thanks for your question. Below is a simple example of this in a Report configuration. 


<Report>

<Text>#{? isEffective(@DDAT, @SA0073 )}</Text>

  <Function name="isEffective" as="Boolean">
    <Parameter name="date1" as="Date"/>
    <Parameter name="date2" as="Date"/>
    <Value select="if $date1 &lt; $date2 then true else false "/>
  </Function>

</Report>




2 人 点赞
登录 发表评论