Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DATE function lowest year 100
Message
From
12/04/2005 08:54:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01003666
Message ID:
01003670
Views:
18
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform