Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

More than 24 hours in Excel shows in Access less than 24

Status
Not open for further replies.

KIOhio

MIS
Jan 8, 2003
15
US
I have an Excel worksheet linked to Access as table. My
current challenge is a field which is formatted for time,
[h]:mm:ss, to show periods of time over 24 hours in Excell
(works fine in Excel), but shows only the remainder hours
not evenly divided by 24 when it gets into Access. For
instance 35:23:17 in Excel shows as 11:23:17 in Access.
How can I get Access to show the full time, beyond 24
hours?

Thanks,

Dan
.

 
Use the same format in Access..... ???? Rgds
Geoff

Si hoc legere scis, nimis eruditionis habes
 
Goeff,
I would be happy to use the same format. It is Access that is changing it, not me. Access is not presenting the time as it shows in Excell and also is not allowing me to change it back. My question is, "Do you know a way?" Does anyone know a way?

Dan
 
Access uses time stamps rahter than elapsed time. u would need a function to create your time format. this routine was found on Google

Function FormatMyTimes(MyTimeValue As Date) As String
Dim dtmTimeOnly As Date
Dim lngDays As Long
Dim lngHours As Long

dtmTimeOnly = TimeValue(MyTimeValue)
lngDays = Int(MyTimeValue)
lngHours = lngDays * 24 + Hour(dtmTimeOnly)

FormatMyTimes = Format$(lngHours, "00") & ":" & Format$(dtmTimeOnly,
"nn:ss")

End Function

u can probably find more info at:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top