Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CTOT() not working for variable, but works for literal
Message
De
21/03/2008 11:09:56
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Database:
MS SQL Server
Divers
Thread ID:
01304337
Message ID:
01304346
Vues:
12
works like a charm. Thanks, Sergey.

>Try
>
>dVal_date = CAST(aCondition[nCond_row,3] AS datetime)
>
>>
>>I have a program where I save a date or datetime, depending on what field they pick. Later, the user can go back in and edit that field variable they saved. But I can not seem to get CTOT() or CTOD() to work correctly with the variable after I get it from the same table, where it is saved as a character string.
>>
>> dVal_date = CTOT(SUBSTR(aCondition[nCond_row,3], AT("(", aCondition[nCond_row,3]) + 2, nDate_width + 12))
>>
>>so I tried,
>>
>>  lcstring = SUBSTR(aCondition[nCond_row,3], AT("(", aCondition[nCond_row,3]) + 2, nDate_width + 12)
>>  lcstring = strtran(lcstring, ["])
>>  dVal_date = CTOT(lcstring)
>>
>>
>>dVal_date keeps saying { // :: }, not the correct time.
>>The value in aCondition[nCond_row,3] is "01/01/2001 12:00 AM"
>>
>>Can someone point me to my problem?
>>
>>TIA
>>Beth
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform