Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid date/datetime values in specific situation
Message
From
28/12/2001 11:09:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00598441
Message ID:
00598822
Views:
19
>>'Set date' command in VFP6 & VFP7 behave a bit different
>>This is a note I cut & paste from VFP7 help
>>"Note: When SET DATE is set to SHORT or LONG, a date before {^1601-01-01} is invalid and generates an error"
>
>Herman,
>
>Thank you for the heads-up. I'm "glad" to see that this new feature is at least documented in the help file. I wonder what happened on that day historically to make VFP7 cringe in disgust.
>
>Well, now the obvious problem we have is that this new feature will crash our application if a user makes a typo in entering a date. One idea I had for a workaround is to use ON ERROR in our date textbox control to try to trap the invalid date/datetime value error.
>
>If anyone else has any other ideas to address this issue, feel free to suggest!
>
>Laterness,
>Jon

"What happened in Rome between October 4 and Oct. 15, 1582(?) ?"

"Nothing - these dates didn't exist."

Before that date, the Julian calendar was used. After that date, the Gregorian. After Thursday, Oct. 4, followed (by decree, of Pope Gregor XIII) Friday, Oct. 15. IOW, before 1582(?), the Gregorian Calendar didn't exist. VFP preferred to "cringe in disgust".

Perhaps you should store dates in numeric fields, or something similar, if you need to go back in time that much.

Hilmar.
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
Next
Reply
Map
View

Click here to load this message in the networking platform