Hi,
I am trying to convert date time to just time in seconds with the below formula someone already helped me with.
/*Hours to seconds*/
(ToNumber(Left([Duty Time],2))*3600)
+
/*Minutes to seconds*/
(ToNumber(Substring([Duty Time],3,2))*60)
+
/*seconds*/
ToNumber(Substring([Duty Time],5,2))
I seem to be getting the same result regardless of duty time however? see attached screenshot.
Any help would be appreciated.
Solved! Go to Solution.
Hi @Genty
It's due to your Duty Time having the date on the front of it.
If it's just the time portion it will work.
Cheers
Joe
Hi @Genty,
I would probably use the below formula which is a little simpler:
ToNumber(DateTimeFormat([Time],'%S')) +
ToNumber(DateTimeFormat([Time],'%M'))*60 +
ToNumber(DateTimeFormat([Time],'%H'))*3600
If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.
Regards,
Jonathan
Thanks Guys both work, realised my input tab changed the column format from time to datetime. sometimes the simple things catch you out.
Yup, can be fun working with dynamic data types 🙂
works for me, thank you.