Time in query

  • Thread starter Thread starter TA
  • Start date Start date
T

TA

Hello,
I have a field name call startime it is interger field it
represent a number (i.e 8:15). How can I extract/process
this field like in a query in order to calculate start
time in the report? Like in the report format:
Start Time:
8 am - Noon: xxx
Noon - 4 pm: xxx

Where xxx is a total number of person.
Best Regards,
TA
 
We probably need to know how you represent 08:15 as an
integer???

Van T. Dinh
MVP (Access)
 
In the table, the data scan in is 8.15 (not 8:15).
Data type is number, and field is single.
Let me know is it clear to you? Thank for your reply.
TA
 
Sorry, I post reply message 1 hour ago but I did not see
it, so I repost it here. Sorry for any confusion.
Hi Dinh,
In the table design the field name is Startime, data type
is Number and filed size is single.
Therefore, in the table record will record as: *.15, or
8.20
So, how can I calculate it?
Thanks for reply.
Best Regards,
TA
 
Sorry, I posted this message 2 times today already but I
did not see in the forum then I repost.

The datatype is number and the fields size is Single,
therefore, the data store as 8.15 not 8:15.
Thanks for reply,
TA
 
Sorry, I posted this message 2 times today already but I
did not see in the forum then I repost.

The datatype is number and the fields size is Single,
therefore, the data store as 8.15 not 8:15.
Thanks for reply,

To convert a Single number 8.15 to a Date/Time value 8:15, you'll need
to pick apart the integer and fractional portions, since .15 is
actually a quarter of an hour, not 15% of one!

Try:

Timevalue(Int([yourtimefield]) / 24 + (100 * ([yourtimefield] -
Int([yourtimefield]) / 1440))
 
Back
Top