|
of_firstdayofmonth
|
|
Full name
|
pfc_n_cst_datetime.of_firstdayofmonth
|
Access
|
public
|
Extend of
|
date
|
Return value
|
date
|
Prototype
|
public function date of_firstdayofmonth(date)
|
Name
|
Datatype
|
ldt_null
|
date
|
public function date of_firstdayofmonth (date ad_source);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_FirstDayOfMonth
//
// Access: public
//
// Arguments:
// date ad_source Date to test.
//
// Returns: date
// The first date of the month passed.
// If any argument's value is NULL, function returns NULL.
// If any argument's value is Invalid, function
// returns 1900-01-01.
//
// Description: Given a date, will determine the first day of the month.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
//Check parameters
If IsNull(ad_source) Then
date ldt_null
SetNull(ldt_null)
Return ldt_null
End If
//Check for invalid date
If Not of_IsValid(ad_source) Then
Return ad_source
End If
// Date (Year, Month, Day)
Return Date (Year(ad_source), Month(ad_source), 1)
end function
Name
|
Owner
|
systemfunctions.date |
systemfunctions
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.month |
systemfunctions
|
systemfunctions.setnull |
systemfunctions
|
systemfunctions.year |
systemfunctions
|
pfc_n_cst_datetime.of_isvalid |
pfc_n_cst_datetime
|