Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date(2006,04,31) does not cause an error?
Message
From
31/05/2006 07:32:05
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01125868
Message ID:
01126113
Views:
19
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform