Dropdown list input.FIELD gives an error when I try to parse it.

Dropdown list input.FIELD gives an error when I try to parse it.

I have a dropdown list.  I populate it with a LOT number + ~ + Date of the lot.  ie: '123456 ~ 09/05/2018'  This works because I can see the lot and date.  If I used a lookup field it only showed the lot number and no date.

The problem I have is when I save the form, in my onSuccess script I have the following code
{
...
lot = input.LOT;

l = lot.startsWith('~');
...
}
the line with the startsWith gives an error
Mismatch data type for function startsWith at argument index 1 expected data type [TEXT] found dataType DATE-TIME

Its not a DATE-TIME field.  Its a text drop down field.  How do I get around this?

THanks