Time format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have control on my Form, its format is "ShortTime".
While posting data it accepts normal all normal hours like 8.00 or 23.59 etc.
BUT it does not accept hour 24.00

Please advise on this topic including some related things also, so that I
can be able to solve this as well as something similar situations of time
also.

Regards

Irshad
 
There is (at least, in the context of Access development) no hour 24.00.
Midnight is hour 00:00.
 
Thanks for your advise.

My situation is that On form I have 3 fields:
TimeStart (Format is ShortTime)
TimeEnd (Format is ShortTime)
TimeConsume (Its control source is =([TimeEnd]-[TimeStart])*24

Some time a staff works from 16:00 hrs. to midnight 02.00 hrs.

On all posting it ok, but when the data comes to solve after 24.00 hrs, it
produces a error.

Please advise me based on this.

Regards.

Irshad.
 
I'm sorry, I'm afraid I don't understand the question. As the problem
appears to involve handling midnight in calculations, you might find some of
the articles at the following URL useful, in particular there is one on that
specific issue: "How to handle midnight in calculations"

http://www.mvps.org/access/datetime/index.html

--
Brendan Reynolds (MVP)


Irshad Alam said:
Thanks for your advise.

My situation is that On form I have 3 fields:
TimeStart (Format is ShortTime)
TimeEnd (Format is ShortTime)
TimeConsume (Its control source is =([TimeEnd]-[TimeStart])*24

Some time a staff works from 16:00 hrs. to midnight 02.00 hrs.

On all posting it ok, but when the data comes to solve after 24.00 hrs, it
produces a error.

Please advise me based on this.

Regards.

Irshad.


Brendan Reynolds said:
There is (at least, in the context of Access development) no hour 24.00.
Midnight is hour 00:00.
 
Back
Top