By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,106 Members | 2,474 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,106 IT Pros & Developers. It's quick & easy.

Time Duration Format

P: 1
My Crystal Report 10 users would like to input a time duration, that is the number of hours/min/sec (hh:nn:ss) that a task took. But if I format as time it screws it up. That is, if a task took 24 minutes and 13 seconds and they input 00:24:13 then it goes into the database as 12:24:13 AM.
please reply.
Apr 1 '12 #1
Share this Question
Share on Google+
3 Replies


nico5038
Expert 2.5K+
P: 3,072
Guess you need to set the timeformat to 24-hrs instead of AM/PM to get the leading 00.
Access displays this "strange" AM time for 00:12:34.

Nic;o)
Apr 1 '12 #2

100+
P: 759
Or use a simple text box without any format. You can check later, using simple code, if the user's input fit with allowed format (ie. hh:mm:ss).
This also allow user to input data in different ways:
a) 34 - the job duration is 34'' ;
b) 12:34 - the job duration is 12'34''
c) 105:12:34 - the job duration is 105h12'34''

I am sure you can get a better answer if you tell us how you plan to use this time information.
Apr 2 '12 #3

NeoPa
Expert Mod 15k+
P: 31,494
As Nico says, using an appropriate format (He suggests HH:nn:ss for 24-hour format) makes best sense. It involves least effort and works out of the box.

Be aware that this limits durations to <24 hours, as at that point and beyond it gives a truncated reading.
Apr 2 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.