Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a machine which can go charging automatically.
For the Action=charging I want to know the duration of it.
Around 2 PM o'clock it will be shutdown. So if the charging of the machine starts around that time it stays at the charging station overnight. But that duration is not representing the average duration its on "charging"
So I instead use the interval of the Action Timestamps where the charging starts and finishes at the same shift.
I wrote something like this:
=if((date(FinishedTime))=(date(StartedTime))),Interval(FinishedTime-StartedTime,'hh:mm:ss'))
But for time in every line of the table I just getting : 00:00:00
I also tried to use the num() to translate the date where the date in numeric is the same, but I would get the same results.
I hope someone has an idea .
Thanks in advance.
Best.
You may need to use the following instead depending upon whether things are strings or not is all I can figure at the moment:
Here is the help for the numeric format you have been trying to use:
Apologies if I am way off here, but hoping this may be the issue.
Regards,
Brett
Hello @Brett_Bleess ,
thank you for your reply. But the problem lies in the condition that both days are the same. The interval is already correctly interpreted via Load Script.
I hope someone else has an idea.
I may be way off here, but I noticed you are calling date function in your expression, should that not potentially be time or timestamp in this case? Sorry if I am still off on things.
Regards,
Brett
Hello @Brett_Bleess ,
yes of course . As far I know I want to tell the If -Statement to only show me the duration between start and finished time in case the the starting and finishing time are still at the same day.
If the duration is calculated between two days....this is something I want to exclude. With date() function
I actually just extract the dates of bowth fieldnames and ask if they are the same. If yes, please return me the duration.
Hope explained better this time.
@Applicable88 sorry I am not more help and hopefully the additional info will help someone with better dev skills than me help you sort things out.
Regards,
Brett