How to format number of hours and minutes in Access 2013

Apple08

Active Member
Joined
Nov 1, 2014
Messages
450
Hi all

I am new to Access. 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.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
The date field wont work that way
so store it as text, and parse in/out the min/secs if you need to.
BUT
if you store [starttime] and [endTime] as date fields THEN you can get it as:
DateDiff("n", [start], [EndTime]) \ 60 & ":" & ((DateDiff("n", [StartTime], [EndTime])/60) -(DateDiff("n", [StartTime], [EndTime]) \ 60))*60
 
Upvote 0

Forum statistics

Threads
1,221,848
Messages
6,162,404
Members
451,762
Latest member
Brainsanquine

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top