How do we test whether a date is within 180 days from today in xslt in datapower

前端 未结 3 808
生来不讨喜
生来不讨喜 2020-12-12 04:39

I am writing an xslt for datapower and in that I am getting a date(Payment Date).I have to check whether that date(Paymentt Date) is within 180 days of current date

3条回答
  •  醉酒成梦
    2020-12-12 05:15

    Calculating date difference in XSLT 1.0:

    
    
    
    
    
        
            
                
                    
                    
                
            
        
     
    
    
        
        
        
            
                
            
        
        
            
                
            
        
        
     
    
    
        
        
        
        
        
        
        
        
     
    
    
    

    When applied to the following input XML:

    
        2013-09-15
    
    

    The result will be:

    
    
      179
    
    

    if the transformation is performed today, 2014-03-13.

提交回复
热议问题