Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
Using QDBC, Issue in Decmal Places from DurationMinues to DurationHours |
Author |
Message |
|
Posted : 2008-11-11 03:40:25 |
I am executing the query to get the dta from Time Sheet, but i se that the minutes data that I am trying to conver in hours, does not return decimal values, I am doing something wrong?
SELECT A.EntityRefFullName, A.TxnDate, A.CustomerRefFullName, A.ItemServiceRefFullName, A.Notes, A.DurationMinutes/60, {fn MONTHNAME( A.TxnDate )} AS "MonthName" , {fn YEAR( A.TxnDate )} AS "Year" FROM TimeTracking A
The above syntax , which gets me DurationMinutes, does not give me correct decimal places when I divide it by 60 (DurationMinues/60), It simply brings in value without decimals.
Kidly Help.
|
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-11-11 08:06:35 |
That's because 60 is a integer, if you make 60 a decimal like this 60.00:-
SELECT A.EntityRefFullName, A.TxnDate, A.CustomerRefFullName, A.ItemServiceRefFullName, A.Notes, A.DurationMinutes/60.00 as DurationHours, {fn MONTHNAME( A.TxnDate )} AS "MonthName" , {fn YEAR( A.TxnDate )} AS "Year" FROM TimeTracking A
you get two decimal places. |
|
|
|
|
Posted : 2008-11-11 09:08:38 |
|
|
|
|