Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

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

Forum : Using QDBC, Issue in Decmal Places from DurationMinues to DurationHoursSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v9 Forum

 New Topic 
 
 Post Reply 
[1]  
 Using QDBC, Issue in Decmal Places from DurationMinues to DurationHours 
 Author   Message 
  Jatinder 
  
 Group: Members 
 Posts: 2 
 Joined: 2008-11-11 
 Profile
 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.

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 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.

 

  Top 
  Jatinder 
  
 Group: Members 
 Posts: 2 
 Joined: 2008-11-11 
 Profile
 Posted : 2008-11-11 09:08:38
Thanks a Ton!! 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to