Time Format my bad

bnickelsen

Registered User.
Local time
Today, 11:19
Joined
Jan 6, 2005
Messages
31
I imported an Excel Sheet into a database. In this sheet were several coulums list travel time from one place to another. In this sheet the time in minutes. ie 120 was the same as 2 hours.

Anyway Now that it is in my database it is still in the number format. Is there an easy way to convert this to a time Format ie hh:nn
 
There is a little trap here, waiting for the inexperienced.

NEVER use a date field to store times that are not date/time combos. If you have elapsed times (which surely are not date/time combos), keep them in some other format like integer or single or double and then write VBA formatting routines for converting them to something more conventional later.

The reason is that a date field contains an implied bias that will hose most FORMAT$ functions to tears if you try to do anything unusual. When you add two dates together you double the bias amount, which makes the date come out somewhere in the 22nd century.

So instead, convert everything to minutes and just display it as hours and minutes using some VBA routine. Search this forum for issues in work hours, time formatting, and similar subjects. This is not an uncommon question.
 
Solved Thx Doc

Thank you for the info.
 

Users who are viewing this thread

Back
Top Bottom