it'd be Rate * Hours worked
# beginners
s
it'd be Rate * Hours worked
k
Use TO_CHAR AND THEN TO_NUMBER and use output results should be float
s
Thakn you @Kevin I tried this but couldnt get it to work TO_CHAR(TO_NUMBER({duration}))
I also tried TO_NUMBER(TO_CHAR({duration})) where duration is datetime, any feedback on why this isn't working, I'm fairly new at SQL
k
@Synx TO_NUMBER(TO_CHAR({duration}, 'hh')) use this since you're trying to extract only hours right
then have it TO_NUMBER(TO_CHAR({duration}, 'hh'))*({rate})
s
idealy it be hours with minutes so I was going to do the value * 24, I do this in excel whenever I want to convert a time to a number
so like for 1:30 itd be 1.5
probably more difficult than it should be lol
k
you should take hour's and convert into minutes like 2*60 and take minutes as well 120+15= 135 minutes something likesss
Also, rate as well convert from dollar equal to minutes 120 rate/ 60 min then use it per min.
it's all up to you however you wanna get it over