of_isvalid


pfcapsrv.pbl   >   pfc_n_cst_datetime   >   of_isvalid   

Full name pfc_n_cst_datetime.of_isvalid
Access public
Extend of boolean
Return value boolean
Prototype public function boolean of_isvalid(datetime)

Name Datatype
No Data

Name Datatype
ldt_value date

public function boolean of_isvalid (datetime adtm_source);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_IsValid
//
//	Access:  		public
//
//	Arguments:
//	adtm_source		DateTime to test.
//
//	Returns:  		boolean
//						True if argument is a valid datetime.
//						If any argument's value is NULL, function returns False.
//						If any argument's value is Invalid, function returns False.
//
//	Description:  	Given a datetime, will determine if the Datetime is valid.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////

date 	ldt_value

//Check parameters
If IsNull(adtm_source) Then
	Return False
End If

//There is only need to test the Date portion of the DateTime.
//Can't tell if time is invalid because 12am is 00:00:00:000000
ldt_value = Date(adtm_source)

//Check for invalid date
If Not of_IsValid(ldt_value) Then
	Return False
End If

Return True

end function

     
Name Owner
pfc_n_cst_datetime.of_relativedatetime pfc_n_cst_datetime
pfc_n_cst_datetime.of_secondsafter pfc_n_cst_datetime

     
Name Owner
systemfunctions.date systemfunctions
systemfunctions.isnull systemfunctions
pfc_n_cst_datetime.of_isvalid pfc_n_cst_datetime

     
Full name
No Data

     
Name Scope
No Data