mysql datetime format change using java for JasperReports generation

前端 未结 1 1661
攒了一身酷
攒了一身酷 2021-01-13 18:55

I am using JasperReport\'s iReport 4.5.0 designer to build my report. I am having one problem with the timestamp fields startDate and endDate

1条回答
  •  旧巷少年郎
    2021-01-13 19:32

    You can try to set net.sf.jasperreports.export.xls.detect.cell.type property for correct formatting in case export to Excel format.

    This issue is very strange. You can add the variable of java.text.DateFormat type and use it like in this sample:

    
    
        
        
        
        
        
            
        
        
        
        
            
        
        
            
                
                    
                    
                    
                
                
                    
                    
                    
                
            
        
    
    

    It is works for me. I have the correct data for both textFields (with using DateFormat and without it) for PDF and XLS.

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