Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Increase a DateTime with minutes from a field
Tue, Mar 17 2015 4:55 AMPermanent Link

durumdara

Dear Support!

I have a table with two important fields.

ActTime - TimeStamp - the starting of an event
LenMins - Integer - the length in minutes

I tried to create an SQL which get the end of the events.

select
  ActTime , LenMins ,
  ActTime + interval LenMins  'minutes'
from
  TheEvents

But the manager said that the interval must be constant value. Is it true?

Version: 2.11 B3

So I cannot add these two values?

Thanks for any information!
Tue, Mar 17 2015 5:34 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

durumdara

>select
> ActTime , LenMins ,
> ActTime + interval LenMins 'minutes'
>from
> TheEvents
>
>But the manager said that the interval must be constant value. Is it true?
>
>Version: 2.11 B3
>
>So I cannot add these two values?

The answer is yes you can but not as you're trying

ActTime , LenMins , ActTime + CAST(LenMins AS INTERVAL MINUTE)


Roy Lambert
Image