skearton Posted June 3, 2011 Share Posted June 3, 2011 Can anyone help me do this? hh:mm:ss to decimal number I've seen the function to do just hh:mm to a decimal number, but I'm not sure how to be able to handle the seconds part of it. Link to comment Share on other sites More sharing options...
comment Posted June 3, 2011 Share Posted June 3, 2011 What exactly is "hh:mm:ss" - is it text, time or...? And "decimal number" - a number of what? Link to comment Share on other sites More sharing options...
skearton Posted June 3, 2011 Author Share Posted June 3, 2011 What exactly is "hh:mm:ss" - is it text, time or...? And "decimal number" - a number of what? It is time format and I think I have it figured out. The convert time field to a decimal number formula would be this (just need to test it still): Hour (time field) + (((Minute (time field) x 100) / 60) + (Second (time field) x 100) / 3600) / 100 Had to tweak it - this is the correct calculation: Round (Hour (xTime) + (((( Minute (xTime) * 100) / 60) + (Seconds (xTime) * 100) / 3600) / 100); 6) Link to comment Share on other sites More sharing options...
comment Posted June 4, 2011 Share Posted June 4, 2011 (Hour (xTime) + (((( Minute (xTime) * 100) / 60) + (Seconds (xTime) * 100) / 3600) / 100) How about just = xTime / 3600 Link to comment Share on other sites More sharing options...
jbante Posted June 6, 2011 Share Posted June 6, 2011 You can also simply do this: GetAsNumber ( xTime ), or with a text string representing the time: GetAsNumber ( GetAsTime ( xTimeString ) ) Link to comment Share on other sites More sharing options...
comment Posted June 6, 2011 Share Posted June 6, 2011 That will give you the number of seconds - not hours as the OP wants. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 4714 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now