VB Version IsDate Differences

Under VB3, IsDate returns True only if the string corresponds to the date format indicated by the “Regional” or “International” settings in the Control Panel. Under VB4 and VB5, however, IsDate returns True if the date is a valid date in any format (mm/dd/yy or dd/mm/yy).
There are two morals to this story. First, if your VB3 apps claim that dates are invalid when they look correct, check the Control Panel settings. Second, if you need to enforce a particular date format in your VB4 and VB5 programs, you need to take steps beyond using IsDate. For example, you can use masked-edit controls or extra code to validate date formats.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: