format hours and minutes

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » Format Hours and Minutes in Access

Format Hours and Minutes in Access

resolvedResolved · High Priority · Version 2013

Format Hours and Minutes in Access

Hi, I need to format hours and minutes in Access and then having a value in the Excel Pivot Table. For example 30 hours 40 minutes should be input as 30:40.

I tried Date/Time, numbers or even short text with input Mask 00:00, but they don't turn out the same format after export to Excel Pivot Table, it showed as 3040 a whole number.

Please could anyone help. The format is flexible, I just want to show how many hours and minutes, and turns out a value for pivot graphic. Any suggestions are welcome.

Many thanks.

RE: Format Hours and Minutes in Access

Hi Elsa,

Thank you for the forum question.

When I first time read your question I was thinking this is an easy one, but I must say it turned out completely different.

Access is not very good at what you want. Access like a start time and a end time but not as you will like to type in 30:40.

I have been through a lot of testing and websites and I can tell you that many have the same problem. The format HH:MM (time formatting) can only handle max 24 hours and you cannot use any other formatting if you want to summarise the hours and minutes in a Pivot Table.

I managed to find a way of doing it. In the database there must be a field for hours and one for minutes. In the Pivot table you will also end with two columns. One for hours and one for minutes. To turn 70 Minutes to 1 hour and 10 minutes you can create some calculated fields.

I have attached a database with a table with few data. I have also attached a Excel workbook where you can find the formulas for the calculated fields you will need in the pivot table.

I hope this can do what you want.

Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Attached files...

time.accdb
timepivot.xlsx

RE: Format Hours and Minutes in Access

Thanks Jens for your prompt reply. I hope this message finds you well.

I can't see your attachments. Have I missed them somewhere?

Regards
Elsa

RE: Format Hours and Minutes in Access

I find them now!

RE: Format Hours and Minutes in Access

Hi Jens, unfortunately I need both hours and minutes showing in one field for duration comparison in pivot chart. I wonder is it possible to put them together? Thanks.

RE: Format Hours and Minutes in Access

Hi Elsa

You have the option to have it in hours or minutes. Excel will not except 60:45 as a number and you can only analyse numbers in the value field in the pivot table.

If you convert the hours and minutes to hours with decimals it can be done.

40:15 = 40.25
65:30 = 65.50
60:45 = 60.75

or turn everything into minutes.

40:15 = 2415

Sorry there is no other way if you want this in one column.


Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

RE: Format Hours and Minutes in Access

Thanks Jen, I decide to convert them into decimal. Many thanks for your help.


 

Access tip:

Zoom feature for queries

If youare working on on query design and creating a calculated field, it can be hard to view the whole statement. You can hold the shift key down and press F2, to show the zoomed up version of the query field

View all Access hints and tips


Server loaded in 0.07 secs.