Calculating day of the week XSL

后端 未结 1 1436
北恋
北恋 2020-12-20 09:04

Trying to calculate day of the week number from date. Found some examples in the internet, but instead of day of the week number i see this : NaN.



        
1条回答
  •  有刺的猬
    2020-12-20 10:09

    The following stylesheet:

    XSLT 1.0

    
    
    
    
    
        
            
        
    
    
    
        
    
        
        
        
    
        
        
        
    
        
    
        
     
    
    
    

    when applied to your input example:

    
      2013-01-01
      2013-05-24
      2013-12-25
      1957-07-13
      1776-07-04
    
    

    will return the following result:

    
    25364
    

    Note:

    The main problem with your attempt is this:

    
    

    Your input has dates, not date-times, and they do not contain "T".

    0 讨论(0)
提交回复
热议问题