Solved

Conversion int to Datetime

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

10 Experts available now in Live!

Get 1:1 Help Now