"R.Smith" wrote...
>
> On 2015-07-29 08:00 PM, jose isaias cabrera wrote:
>>
>> Doctor Hipp wrote...
>>
>>> On 7/29/15, jose isaias cabrera <jicman at cinops.xerox.com> wrote:
>>>
>>> SELECT
>>>  CASE WHEN time('now','+5.5 hours','localtime') > '17:00:00'
>>>       THEN datetime('now','+21.0 hours','localtime')
>>>       ELSE datetime('now','+5.5 hours','localtime') END;
>>>
>> So, I will have to do two select, one for the subtraction of the hours 
>> over 5.5 and the other select for the actual date desired. Ok, thanks.  I 
>> thought it could be done all in one entry.
>
> No, it can be done in one select - Dr. Hipp's suggestion is just 1 select, 
> how do you see 2 selects?

he calculated the 21 hours.  But the 5.5 hours can vary, so that was just a 
number I suggested.

> Are the hours or some other thing in your query variable?
Yes.  That 5.5 hour is an input from someone.  It could be 1, 1.5, ...100, 
etc. But, it will be an hourly amount.  It can also be 0.5 hour.  So, that 
needs to be calculated.

> Maybe give us your actual query and we could understand and help better.
You did it on the previous one. ;-)  Thanks.

Reply via email to