Good Day Devs,
I think there is an issue with the CHARS_FROM_LEFT function but it could just be me.
I am looking at some time selections in the format of {hour} space {AMPM} EX: 11 AM, 12 PM, 1 PM, 2 PM
I then convert that to a string formatted like 11:00, 12:00, 13:00, 14:00 etc.
All the selections work with the exception of the 1 PM selection.
I have been trying to figure it out for several, no many hours.
Any assistance would be appreciated.
I will upload a sample BSV of the issue but here is my Rule code.
Any assistance is much appreciated.
If CHARS_FROM_RIGHT(tempBO.TimeChoice,2)='AM' AND CHARS_FROM_LEFT(tempBO.TimeChoice,2)<'10' Then
tempBO.Result=CHARS_FROM_LEFT(tempBO.TimeChoice,1)+':00'
Else If CHARS_FROM_RIGHT(tempBO.TimeChoice,2)='AM' AND CHARS_FROM_LEFT(tempBO.TimeChoice,2)>='10' Then
tempBO.Result=CHARS_FROM_LEFT(tempBO.TimeChoice,2)+':00'
Else If CHARS_FROM_RIGHT(tempBO.TimeChoice,2)='PM' AND CHARS_FROM_LEFT(tempBO.TimeChoice,2)='12' Then
tempBO.Result=CHARS_FROM_LEFT(tempBO.TimeChoice,2)+':00'
Else
tempBO.Result=CHARS_FROM_LEFT(AS_STRING(AS_NUMBER(CHARS_FROM_LEFT(tempBO.TimeChoice,1))+12),2)+':00'