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.
Microsoft AccessVisual Basic ClassicSQL

Avatar of undefined
Last Comment
Patrick Matthews
ASKER CERTIFIED SOLUTION
Avatar of dqmq
dqmq
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo