Information générale
Catégorie:
COM/DCOM et OLE Automation
>>
>>I am also considering adding the extra "=" prefix character only if I really need it to prevent the data conversion. Unfortunately, this could be an intensive effort since things like "7440-09-7" should never have been assumed to be a date. UGH! As a related question, is there any fast way test if a string contains any alpha character? So for example I would add the "=" prefix if I had a code like "7440-09-7" with dashes in positions that might be dates, but not for codes like "7A40-09-7" that had an alpha character.
>>
>>Thanks,
>>Jeff
>Yes, with chrtran() you can strip out digits and hyphens. If the len() >remains > 0, it means you have a letter, in your example, an "A".
>? len(chrtran("7A40-09-7", "0123456789-", "")) > 0
Thanks for all your help, this is working great in production
Jeff
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement