IsDate

Tests if a string can be converted to a ProPgDatesDate Serial

Syntax
	KeyPgDeclareDeclare KeyPgFunctionFunction IsDate ( KeyPgByrefByRef stringdate KeyPgAsAs KeyPgConstQualifierConst KeyPgStringString ) KeyPgAsAs KeyPgLongLong

Usage
	#include "vbcompat.bi"
	result = IsDate( stringdate )

Parameters
	stringdate
		the string to test

Return Value
	Returns non-zero (-1) if the date string can be converted to a 
	ProPgDatesDate Serial, otherwise returns zero (0).

Description
	Date strings must be in the format set in the regional settings of the 
	OS to be considered valid dates.

	IsDate(KeyPgDateDate) will return non-zero (-1) only if the regional settings 
	specify the same date format that QB used.

	The compiler will not recognize this function unless vbcompat.bi or 
	datetime.bi is included.

Example
	#include "vbcompat.bi"

	Dim s As String, d As Long

	Do
	  Print
	  Print "Enter a date: "

	  Line Input s

	  If s = "" Then Exit Do

	  If IsDate( s ) = 0 Then
	   Print "'"; s; "' is not a valid date"
	  Else
	   d = DateValue( s )
	   Print "year  = "; Year( d )
	   Print "month = "; Month( d )
	   Print "day   = "; Day( d )
	  End If

	Loop

Differences from QB
	* New to FreeBASIC

See also
	* ProPgDatesDate Serials
	* KeyPgDateSerialDateSerial
	* KeyPgTimeValueTimeValue
	* KeyPgDateValueDateValue

