Convert date from DD-MMM-YYYY to YYYYMMDD format in xslt 1.0

前端 未结 3 1643
迷失自我
迷失自我 2020-12-17 01:20

How we can convert the date format from DD-MMM-YYYY to YYYY-MM-DD in XSLT.

10-JAN-2013 TO 20130110

in XSLT 1.0

3条回答
  •  执念已碎
    2020-12-17 01:58

    If you can use node-set as extension to your xslt 1.0 processor you can try this.

    
    
    
    
    
    
    
    
    
        
        
    
    
    
    
    
        
        
        
        
        
        
        
        
    
    
    
        
            
        
    
    

    The output will be:

    20130110
    

    Update doe to additional question in command:

    You can call the template at any place where you have used before.

    
        
            
        
    
    

    Or you can assign the result to an new variable and use this.

    
        
            
        
    
    
    
        
    
    

提交回复
热议问题