Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC, datetime()
Message
De
17/08/2013 09:37:27
 
 
À
17/08/2013 08:26:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01580683
Message ID:
01580694
Vues:
35
>>>How can I insert current datetime in my sql table via VFP ?
>>>
>>>year, month, day, h, m,s
>>>
>>>Please help me insert date in line below:
>>>
>>>cSQL = "UPDATE reembolso set reg_correios= ?m.reg_correios, env_ect = 1 where code = ?m.code, datetime = "
>>>
>>>asa=SQLEXEC(lnHandle,cSQL )
>>>
>>>I am not sure if I have to convert it.
>>>
>>>Moises
>>
>>
>>Moises
>>
>>The function below will return a SQL date formatted string for either a character or date variable
>>
>>
>>
>>PARAMETERS pd_date
>>
>>LOCAL lc_date
>>
>>IF TYPE("pd_date") = "C"
>>  pd_date = CTOD(pd_date)
>>ENDIF
>>
>>lc_date = ALLTRIM(STR(YEAR(pd_date))) + "-" + ;
>>            PADL(ALLTRIM(STR(MONTH(pd_date))), 2, "0") + "-" + ;
>>            PADL(ALLTRIM(STR(DAY(pd_date))), 2, "0")
>>
>>RETURN lc_date
>>
>>
>
>Bill,
>
>A bit shorter
>
>
>lc_date = transform(dtos(m.pd_date), '@R ####-##-##')
>
Yes, indeed. I'll grab that one, Gregory.
Thanks
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform