Solved

Conversion int to Datetime

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adventure works database .msi 4 60
Not selecting duplicate data 6 42
Is there any Easy way to copy CSV to SQL Server using C# 3 69
SQL Backup skipping a few tables 7 35
Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
How to increase the row limit in Jasper Server.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now