Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8627

XPath Date Comparison in Repeater

$
0
0


Looking for some help trying to get a date comparison working in a repeater.  I read some other posts, and tried many variations, but I cannot get the date check to work.  I ended up doing the comparison inside the loop, but it checks all 500 or so records, slowing things down.  Objective is delete records older than a calculated date.  Working in MII 12.2.

 

Here is the basic variation of my attempts:

 

--Action [GetBomList] outputs an xml docuement, each row the same:

--------------------------------------------------------------------------------------------

<Row>

<Material>140961</Material>

<Description>FP BANANA CREAM OIKOS 3% DUS</Description>

<Version>P001</Version>

<DateTime>2014-05-01T14:36:30</DateTime>

<Scheduled>05/14/2014</Scheduled>

<Status>4</Status>

<User>STARK</User>

<StatusDesc>NEW BOM</StatusDesc>

<bomDate>2014-05-01T14:36:30</bomDate>

</Row>

 

DateTime and bomDate are the same, needed both (yes, DateTime bad name, not mine).

 

--Repeater source

------------------------

GetBomList.OutputXML{/Rowsets/Rowset/Row[DateTime<='#Local.BomDeleteDate#']}

 

I have tried with Local.BomDeleteDate as both a string and a dateTime.  Comparing DateTime='2014-05-01T14:36:30' works, for example, but

that seems to be a string comparision, not by date.

 

Seems like it should be simple, but maybe answer is a comparision of two date strings will not work with these inputs.

 

Thanks in Advance,

Dan K


Viewing all articles
Browse latest Browse all 8627

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>