how do I convert minutes to decimals?

B

Brian P

I'm trying to convert minutes to decimals i.E. 15 minutes :)15) to .25
minutes / 60 should work =)
 
J

John Vinson

I'm trying to convert minutes to decimals i.E. 15 minutes :)15) to .25

What's the datatype of your field containing minutes? If it's
Date/Time, bear in mind that this field type is best used for exact
points in time, rather than durations. If it *is* a date/time, note
that Access stores such values as a Double Float count of days and
fractions of a day; so you should be able to use

CDbl(TimeValue([your-field-name])) * 24.

TimeValue will discard any date portion of the time field, CDbl will
convert the value to a Double number (where 6:00:00 will convert to
..25, a quarter of a day) and multiplying that fraction by 24 will get
you hours.

John W. Vinson[MVP]
 
Top