Finding the difference between 2 dates in xslt

前端 未结 3 1798
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-09 13:20

Is there a less then kludgey way of finding the difference in days between 2 dates in xslt? If so can you point me in the right direction. I am receiving dates in the format

3条回答
  •  无人及你
    2020-12-09 13:41

    Use XSLT 2.0 (XPath 2.0) for this:

    
        
    
     
         
         
    
       
     
    
     
      
    
      
     
    
    

    when this transformation is applied on the following XML document:

    
     04/06/2011
     01/11/2010
    
    

    the wanted, correct result (the difference is 450 days) is produced:

    450
    

提交回复
热议问题