Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Function

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I've created a date field " hh:mm:ss " - but I am not able to do calculations on these numbers. If I add 23:00:00 + 18:25:00 - I would like to get 41:25:00 - but I get 1.72569444444444. Also if I enter 23:00:00 it is automatically converted to 11:00 PM. I would like it to remain in the format it was entered. Is this possible? Any help would be greatly appreciated! :)
 
You've got several problems here.

You're getting the decimal result because wherever you're writing the results to is not formatted for date/time. You're getting the conversion to 12 hour clock again, because of incorrect formatting of the field/control which is displaying the data.

Finally, even if you do solve these formatting issues, you will never be able to add times together in the way you are hoping. Time is handled in a completely different way to standard numeric data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top