Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date(2006,04,31) does not cause an error?
Message
De
31/05/2006 07:32:05
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01125868
Message ID:
01126113
Vues:
22
I think that it would be more consistent that both calls return either a blank date, or an error.

>Ravi,
>
>I guess it's the difference between an out of range parameter in the first case (there are no months with > 31 days in them) and valid parameters that do not resolve to a valid date in this case VFP will return an empty date value.
>
>>The Date() function can be used to create a date variable, e.g. ldStart = Date(2006,02,05). Consider the following commands:
>>
>>? DATE(2006,04,35)
>>? DATE(2006,04,31)
>>
>>The first command causes an error (I expect that) whereas the second command does not cause an error and displays an empty date. I feel that the second command should also cause an error instead of returning an empty date.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform