When I try to develop reports by pentaho report designer or jasper report or other report tools, a usual problem is to show seconds in hh:mm:ss format. Those report tools normally don't have function to show this. is there any solution for this?
Asked
Active
Viewed 305 times
0
-
Possible duplicate of [How to display date in HH:mm:ss format in JasperReports?](http://stackoverflow.com/questions/2643988/how-to-display-date-in-hhmmss-format-in-jasperreports) & [How to change the date format in Ireport 4.5](http://stackoverflow.com/q/8845425/876298) & [Date formatting part of text in Jasper / ireports](http://stackoverflow.com/q/15816874/876298) – Alex K Dec 28 '16 at 07:47
1 Answers
0
In TSQL, you can do this
declare @OrigValue int;
set @OrigValue = 121.25;
select replace(str(@OrigValue/3600,len(ltrim(@OrigValue/3600))+abs(sign(@OrigValue/359999)-1)) + ':' + str((@OrigValue/60)%60,2) + ':' + str(@OrigValue%60,2),' ','0')

elawcn
- 51
- 2