Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
harish_meda
Contributor II
Contributor II

how to show hrs and mins string values with result for Interval time

Hi All,

I have start date and end date 

stdate:2021-02-22 00:07:00

Endate :2021-02-22 04:24:08

Interval(date('2021-02-22 04:24:08'-'2021-02-22 00:07:00'),'hh:mm')-->Result is " 04:17".

now i need to display hrs after 04 and mins after 17  ,Like"  04hrs:17Mins"

1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

Using the data below:

Data:
Load *,
Interval(date(enddate-stdate),'hh:mm') as I1,
Num(Interval(date(enddate-stdate),'hh')*24,'00')&'hrs:'&Num(Frac(Num#(Interval(date(enddate-stdate),'mm'))/60) * 60,'00')&'mins' as I2;
Load * Inline [
stdate,enddate
2021-02-22 00:07:00,2021-02-22 04:24:08
];

 

cap1.png

View solution in original post

1 Reply
jwjackso
Specialist III
Specialist III

Using the data below:

Data:
Load *,
Interval(date(enddate-stdate),'hh:mm') as I1,
Num(Interval(date(enddate-stdate),'hh')*24,'00')&'hrs:'&Num(Frac(Num#(Interval(date(enddate-stdate),'mm'))/60) * 60,'00')&'mins' as I2;
Load * Inline [
stdate,enddate
2021-02-22 00:07:00,2021-02-22 04:24:08
];

 

cap1.png