Can't enter 24:00 as time

I have a field with a medium time format.  To save data entry clicks, i have an after update set to if the user entered the time in military format, that it would convert the time to medium time.  This has been working great except for if a user enters 24:00, i get an error that says isn't a valid value.  Why?  It should just conver the 24:00 entered into 12:00 AM with my code.  It converts 23:00 entered into 11:00 PM.

Private Sub txtFromTime1_AfterUpdate()
Me.txtFromTime1.Value = Format(Me.txtFromTime1, "Medium Time")
End Sub
LVL 2
michael1174Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mrroonieCommented:
it could be due to there isn't a 24th hour on a 24 hour clock - after 23.59  it goes back to 00:00
0
PorpathamCommented:
Hi,
              Which version of Microsoft Access you are using,

Kindly check the Microsoft link:
http://support.microsoft.com/kb/195805

0
sysops6Commented:
Hi Michael

mrroonie is correct.

24 hour time starts from 00:00.00 and ends at 23:59.59. (hh:mm.ss)

Please read this wikipedia article on the subject: http://en.wikipedia.org/wiki/24-hour_clock

It is noted that using the time 24:00 to represent time is only to be used as a representation of the end of a day or to provide clarity when one wants to indicate midnight at the end of a day.

Short answer: 24:00.00 is to be used for notation purposes only and not to be used when trying to express midnight or 00:00.00.

Hope this helps.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

zoom2000Commented:
There's no time called 24:00
The time ends at 23:59 then goes to  00:00
so it must raise an error
0
mrroonieCommented:
so my suggestion was wrong then?
0
michael1174Author Commented:
mrroonie, I'm sorry about that I thought I gave you points too.
0
michael1174Author Commented:
Thanks everyone!
0
PorpathamCommented:
Hi Friends,

Please find the Below Link . It will explain u lot. If u use 24:00. After that it will reset to 00.00. In between
60 Min Will be there. Then we will have 25 Hrs Per Day. Is That right Calculation. Strongly Disagree. 00.00 and 24:00 are same. Please find the below link. It will help u to get Conclution.

http://www.mail-archive.com/leapsecs@rom.usno.navy.mil/msg01333.html

Please reply Guys.
0
michael1174Author Commented:
Thanks... that is helpful!
0
mrroonieCommented:
muchas gracias senor
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.