PalDateMaskApply

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalString PalDateMaskApply( SalString sDate,
		         SalString sMask )

The PalDateMaskApply method applies a date mask to a string representation of a date

Parameters

Name Description
SalString sDate String to which the mask will be applied. This string can have any format.
SalString sMask Date mask consisting of substitution characters # and any other characters. The number of substitution characters in the mask must be equal to the number of characters in sDate.

Returns

The return value is the merger of the string and the mask

Comments

This method is typically called before validation.

Example

Set sDate = PalDateMaskApply( '960130', '19##-##-##' )
! sDate is now '1996-01-30' 
C# coding
sDate = Int.PalDateMaskApply("960130", "19##-##-##"); 
sDate is now "1996-01-30"