Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem to compare date+time with System datetime
Message
 
À
22/07/2013 18:23:23
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01579024
Message ID:
01579026
Vues:
47
>Hello comunity
>
>I have build this code to compare the date and time on my document with my System datetime(), and is is less than my System datetime the rule don´t save the record:
>
>Please see my code in jpg
>
>The problem thas is not work, the error is :
>Line 10
>Function argument value, type, or count is invalid
>
>someone could give me help.
>Many thanks
>Luis Santos

You do not need to transform the date to C, you can do something like this:
myDateTime = DATETIME(YEAR(XPDData), Month(XPDData), Day(XPDData),VAL(SUBSTR(XPDHORA ,1,2)),VAL(SUBSTR(XPDHORA ,4,2)),VAL(SUBSTR(XPDHORA ,7,2)))
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform