search for: hour_selected

Displaying 7 results from an estimated 7 matches for "hour_selected".

2020 Feb 13
4
Help with FUNC_MATH
Hi, I have some dialplan code that is trying to convert 12 hour time with AM/PM to 24 hour format. The code has something like this: Exten => 2,1,ExecIf(${MATH(${HOUR_SELECTED}<12)}?Set(HOUR_SELECTED=${MATH(${HOUR_SELECTED}+12,int)})) Earlier on in the dialplan HOUR_SELECTED is set to 12. When they press option 2 they are selecting PM. If the time is from 1PM to 11PM then I want to add 12 to the number (so if it's 1 make it 13 etc.). When I run the above the logs...
2020 Feb 13
1
Help with FUNC_MATH
HOUR_SELECTED is going to be 1-12 On Thu, Feb 13, 2020 at 2:05 PM Don Kelly <dk at donkelly.biz> wrote: > Is HOUR_SELECTED a floating-point number (e.g. 11.99999999999)? If so, you > need to account for that in your comparison. > > > > --Don > > > > > > *From:* aste...
2020 Feb 13
2
Help with FUNC_MATH
...Feb 13, 2020 at 3:49 AM Dovid Bender <dovid at telecurve.com> wrote: > >> Hi, >> >> I have some dialplan code that is trying to convert 12 hour time with >> AM/PM to 24 hour format. The code has something like this: >> Exten => >> 2,1,ExecIf(${MATH(${HOUR_SELECTED}<12)}?Set(HOUR_SELECTED=${MATH(${HOUR_SELECTED}+12,int)})) >> >> Earlier on in the dialplan HOUR_SELECTED is set to 12. When they press >> option 2 they are selecting PM. If the time is from 1PM to 11PM then I want >> to add 12 to the number (so if it's 1 make it 13 e...
2020 Feb 13
2
Help with FUNC_MATH
...>>> wrote: >>> >>>> Hi, >>>> >>>> I have some dialplan code that is trying to convert 12 hour time with >>>> AM/PM to 24 hour format. The code has something like this: >>>> Exten => >>>> 2,1,ExecIf(${MATH(${HOUR_SELECTED}<12)}?Set(HOUR_SELECTED=${MATH(${HOUR_SELECTED}+12,int)})) >>>> >>>> Earlier on in the dialplan HOUR_SELECTED is set to 12. When they press >>>> option 2 they are selecting PM. If the time is from 1PM to 11PM then I want >>>> to add 12 to the numbe...
2020 Feb 13
0
Help with FUNC_MATH
Is HOUR_SELECTED a floating-point number (e.g. 11.99999999999)? If so, you need to account for that in your comparison. --Don From: asterisk-users [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Dovid Bender Sent: Thursday, February 13, 2020 4:47 AM To: Asterisk Users Mailing List - No...
2020 Feb 13
0
Help with FUNC_MATH
...k (range 01 to 12). On Thu, Feb 13, 2020 at 3:49 AM Dovid Bender <dovid at telecurve.com> wrote: > Hi, > > I have some dialplan code that is trying to convert 12 hour time with > AM/PM to 24 hour format. The code has something like this: > Exten => > 2,1,ExecIf(${MATH(${HOUR_SELECTED}<12)}?Set(HOUR_SELECTED=${MATH(${HOUR_SELECTED}+12,int)})) > > Earlier on in the dialplan HOUR_SELECTED is set to 12. When they press > option 2 they are selecting PM. If the time is from 1PM to 11PM then I want > to add 12 to the number (so if it's 1 make it 13 etc.). When I run...
2020 Feb 13
0
Help with FUNC_MATH
...id Bender <dovid at telecurve.com> wrote: >> >>> Hi, >>> >>> I have some dialplan code that is trying to convert 12 hour time with >>> AM/PM to 24 hour format. The code has something like this: >>> Exten => >>> 2,1,ExecIf(${MATH(${HOUR_SELECTED}<12)}?Set(HOUR_SELECTED=${MATH(${HOUR_SELECTED}+12,int)})) >>> >>> Earlier on in the dialplan HOUR_SELECTED is set to 12. When they press >>> option 2 they are selecting PM. If the time is from 1PM to 11PM then I want >>> to add 12 to the number (so if it'...