Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I have data like below format
Closed Date,Open Date
10/10/2017 12:15:00 P.M.,10/10/2017 12:05:00 P.M.
27/01/2018 1:00:00 P.M., 25/10/2018 11:00:00 A.M.
I have to calculate difference in between Closed Open-Open Date in Minutes.
Expected Output:-
1) 10(Minutes)
2) 30000(Minutes) (25,26,27 dates calculation hours 50*60=3000)
omarbensalembpngwassenaarmbaeyens
Regards
Mahesh
I had some problem with the periods in AM and PM. Once I stripped them out, this worked:
=num((num([Closed Date]) - num([Open Date]))*24*60,'#,##0')
can you please change the time format from 12 hours to 24 hours remove the A.M&P.M by using Purgechar.
I tried same thing but i am getting correct output.
-Mahesh
sorry,
I am not getting correct output.
Can any one help me on this?
-mahesh
Can you post a sample qvw showing the problem?
Hi Bro,
I tried with your logic it not giving result.
Mahesh
Hi
script:
load timestamp(timestamp#(PurgeChar([Closed Date],' .'),'DD/MM/YYYYhh:mm:ssTT')) AS [Closed Date] ,
timestamp(timestamp#(PurgeChar([Open Date],' .'),'DD/MM/YYYYhh:mm:ssTT')) AS [Open Date] ;
load * inline [
Closed Date,Open Date
10/10/2017 12:15:00 P.M.,10/10/2017 12:05:00 P.M.
27/01/2018 1:00:00 P.M., 25/01/2018 11:00:00 A.M.
]
straight table
dimension
[Open Date]
[Closed Date]
expression
Interval([Closed Date]-[Open Date],'mm')
See the attachment (uses your data):