0

Hello all,

I have an MS SQL table. There are two columns I need to work on: HOURS_DURATION and MINUTES_DURATION. They are of INT type. As you may see in the photo I am attaching: TABLE SAMPLE IMAGE

Now, I am making a fast report. And for now I have a simple cast to varchar and addition of zero if a len(field)=1 and it looks like: 02:40, for instance.
The problem is I cannot make a SUM of these times...
Can you guys direct me and help me solve this?

Do I have to do this conversion in SQL select statement? or somewhere in the fast report?

Thank you in advance!

2
Contributors
1
Reply
9
Views
2 Years
Discussion Span
Last Post by Taywin
0

Can't you use SUM() inside your query after you alias the column??? Please provide a sample query that used to create the table/view you mentioned.

By the way, you could use cast() function to convert varchar to int as well.

Edited: I just realized I misunderstood your purpose. You should be able to use MySQL Arithmatic Operators to manipulate int to calculate time (with DIV and MOD).

Edited by Taywin

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.