Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert DateTime to a string to send to SQL serv
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01480183
Message ID:
01480222
Vues:
50
>>>
>>>transf(ttoc(datetime(), 1), '@R ####-##-##T##:##:##')
>>>
>>>
>>>But the best is using parameters - no conversion needed
>>
>>Thank you for the link. For this particular case I chose to use GetDate() that seems to be the native SQL server function and probably synchronizes the date and time with the SQL Server which I think is a benefit.
>
>GetDate() will give you the current datetime on the server. ttoc(datetime()) will give you datetime on the client.

This is why I chose GetDate so that the Date and Time will be consistent for all clients.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform