I've got a series of time values (hh:mm:ss) that i'm importing in from Excel. Access wants to read these values as real time, converting it to AM/PM.
How can I change the format of my main table to reflect this type of data?
I've got a series of time values (hh:mm:ss) that i'm importing in from Excel. Access wants to read these values as real time, converting it to AM/PM.
How can I change the format of my main table to reflect this type of data?
<IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
<small>www.kvisions.com

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
When importing the Excel table, declare the field as a "double" datatype.
This will allow you to run a time <font color=red>conversion</font color=red> function on the field.
BTW...Here's a script I found particularly useful
Function GetTimeTotal ()
Dim db As Database, rs As Recordset
Dim totalhours As Long, totalminutes As Long
Dim days As Long, hours As Long, minutes As Long
Dim interval As Variant, j As Integer
Set db = dbengine.workspaces(0).databases(0)
Set rs = db.OpenRecordset<font color=blue>("MyTable")</font color=blue>
interval = #12:00:00 AM#
While Not rs.EOF
interval = interval + <font color=blue>rs![Daily hours]</font color=blue>
rs.MoveNext
Wend
totalhours = Int<font color=red>(CSng(interval * 24))</font color=red>
totalminutes = Int<font color=red>(CSng(interval * 1440))</font color=red>
hours = totalhours Mod 24
minutes = totalminutes Mod 60
GetTimeTotal = totalhours &" hours and " &minutes &" minutes"
End Function