Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DATE function lowest year 100
Message
De
12/04/2005 08:54:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01003666
Message ID:
01003670
Vues:
19
>Hi,
>
>I just had some problems with the DATE() function. This function allows only dates equal or greater 100. Why? A date field can hold year values between 0 and 99. Retrieving such a year with YEAR() and later using it in DATE() leads to an error. This seems to be a bit weird to me. Need a go back to CTOD for date calculations?
>
>Andreas

year() will always return the full year, including the century.

date() will insist on including the 4-digit year, to avoid ambiguities.

Dates before ca. 1600 are doubtul anyway, because of the ambiguities between the Julian and the Gregorian calendar - VFP doesn't allow dates before 1600 for some functions.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform