Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

LAST_DAY - Get date of the last day of the month in Informatica

LAST_DAY( date )


Example : The following expression returns the last day of the month for each date in the ORDER_DATE port.
LAST_DAY( ORDER_DATE )            Return value
Apr 1 1998 12:00:00AM                 Apr 30 1998 12:00:00AM
Jan 6 1998 12:00:00AM                 Jan 31 1998 12:00:00AM



Example : The following expression returns the first day of the month for each date in the ORDER_DATE port.
ADD_TO_DATE(ADD_TO_DATE(LAST_DAY( ORDER_DATE ),'MM',-1),'DD',1)
ORDER_DATE                         Return value
Apr 1 1998 12:00:00AM                 Apr 1 1998 12:00:00AM
Jan 6 1998 12:00:00AM                 Jan 1 1998 12:00:00AM