Solved

Conversion int to Datetime

Posted on 2009-07-09
2
328 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 59

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
View SQL 2005 Job package 16 77
denied execute as 13 31
Trying to understand why my Index is so large 12 18
calculate running total 8 16
Problem Statement In an SAP BI BO Integration project when a BO universe is built on a BEx query, there can be an issue of unit & formatted value objects not getting generated in a BO universe for some key figures. This results in an issue whereb…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

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