Solved

Conversion int to Datetime

Posted on 2009-07-09
2
333 Views
Last Modified: 2012-05-07
Hi expert, hope that someone help me to find a solution to this problem.
I'm developing COGNOS BI based on SQL 2000 database,the BI Application must produce report about Hour of job of one employee , and other information.
In one table i stored the minute (datatype=INT) so 480minute are 8hour, or 7153 it's equal to 119hour and 13 minutes..On the Cognos side when i create repor of aggregate data , i have some trouble because the calculation give me error of  non compatibilty datatype because the data coming out from sql server as char this because i want format the data in this way:
hh:mm
So my question is what is the best datataype to store correctly the number of hour
ex: 08:30 .and what kind of trasformation i will do to have the possibility of calculate the TOTAL of hour trought COGNOS FRAMWORK
0
Comment
Question by:fabiogaravelli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 500 total points
ID: 24817584
I would leave the data as INT until you are done calculating or maybe MONEY or other DECIMAL datatype if instead of minutes you want to store as hours like 8.5 (08:30), then once you have finished aggregating, you can just format as you would like.
0
 
LVL 5

Expert Comment

by:welchb123
ID: 24908558
You should leave the data as int and then create a calculation in Cognos Framework to translate to hours and minutes and add formating.    Don't forget to close this qustion if you have all the answer you need.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
How to increase the row limit in Jasper Server.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question