float( !XField!)
Fix the database, it's that important. I just see no value in doing gymnastics to wrestle things that should be modeled for what they are at the database tier.
If it's a date, store it as such. Decimals, floats, integers? Then that's what they are period.
Get with the database admin, and make it right. You will save yourself tons of headaches, not just in the immediate, but long-term life-cycles of the tools and applications you build will be better off.
Unfortunately this isn't an option as it is an third party application database. Any tampering would breach our support agreement 😞
How exactly are you "sucking in" the Oracle data as you mentioned in your OP?
Apologies, I should have included that info. as it is important; I'm using the Make Query Table tool.
That's my bad. Missed it.
Well... I wonder if you can perform the conversion directly in the SQL as part of the MakeQueryLayer_management implementation. I will hunt around to see if there are examples.
My thought is, can you issue a "CAST" or "TO_NUMBER" statement in the sql somewhere?
Edit: I noticed that you are attempting to implement MakeQueryTable! Man, that stuff just looks messy. If it were me, I'd go towards python script and implement the cx_Oracle library --- you have so much more control. I know that is outside of the bounds for your OP and sorry I don't have a good solution other than this. BUT, the cx_Oracle lib is very awesome 🙂