Page 1 of 1

How to get first day of the last month

Posted: Mon Nov 10, 2008 3:36 am
by pavans
Hi
I have two columns where i need to load as :
TARIH1 = first day of the last month
TARIH2 = last day of the last month.

any help appreciated.

Thanks in advance.

Re: How to get first day of the last month

Posted: Mon Nov 10, 2008 6:31 am
by uppalapati2003
Hi pavan,

Please take all these stage variables and pass the required Stagevariables to output columns:

MonthDayFromDate(CurrentDate())= stageVariable1
DateFromDaysSince(- stageVariable1,CurrentDate())=stageVariable2
DateFromDaysSince(- 1, stageVariable2)stageVariable3
MonthDayFromDate(stageVariable3)=stageVariable4
DateFromDaysSince(- stageVariable4,stageVariable2)stageVariable5


stageVariable2 gives lastday in the previous Month.
DateFromDaysSince(- stageVariable1,CurrentDate())=stageVariable2

stageVariable5 gives the FirstdayinLastmonth
DateFromDaysSince(- stageVariable4,stageVariable2)=stageVariable5