Link to home
Start Free TrialLog in
Avatar of APD Toronto
APD TorontoFlag for Canada

asked on

SQL Conversion Time to Decimal

Hello Experts,

I have a time field, set to Date/Time with input mask 00:00;0;_

The field accepts values like 8:48, 10:45 and 16:11 and I'm wondering if i can convert these do decimal using a SQL Query?

for example, if i were using vb to convert i would use the folwing logic:

hr = anything before the colon
min = anything after the ccolon

result = hr + (min / 60)
'
so 8:48 = 8.8
   10:45 = 10.75
   16:11 = 16.18333

Is this possible in SQL Query?

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of dqmq
dqmq
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial