how to get next or previous month from existing one
Posted: Tue Aug 19, 2008 11:54 pm
Hi all,
I am having on scenario like.. I want to allow the records for the previous month and again after a month it has to be repeated with previous month incremented.
for example
there are 4 fields inthat Inlink.Field1 has value like 'May 08'
Inlink.Field1 Inlink.Field2 Inlink.Field3 Inlink.Field4
'May 08' '323' 'like' 'nike'
'Apr 08' '234' 'xmdjk' 'dkfadl'
next month the record coming is
Inlink.Field1 Inlink.Field2 Inlink.Field3 Inlink.Field4
'Jun 08' '432' 'dkdfa' 'dlkjfd'
'May 08' '323' 'like' 'nike'
'Apr 08' '234' 'xmdjk' 'dkfadl'
I want to allow the June month records only not all the records, like
Outlink.Field1 Outlink.Field2 Outlink.Field3 Outlink.Field4
'Jun 08' '432' 'dkdfa' 'dlkjfd'
'May 08' '323' 'like' 'nike'
'Apr 08' '234' 'xmdjk' 'dkfadl'
I am using the following transform to get the previous month first date
Oconv(Iconv(InLink.Field1,'D MY[A3,2]'),'DYMD')
But how to get previous month +1 , month ? is there any functions like NEXTMONTH() as in oracle ? or how to proceed with this? any suggestions are welcomed
thanks in advance
I am having on scenario like.. I want to allow the records for the previous month and again after a month it has to be repeated with previous month incremented.
for example
there are 4 fields inthat Inlink.Field1 has value like 'May 08'
Inlink.Field1 Inlink.Field2 Inlink.Field3 Inlink.Field4
'May 08' '323' 'like' 'nike'
'Apr 08' '234' 'xmdjk' 'dkfadl'
next month the record coming is
Inlink.Field1 Inlink.Field2 Inlink.Field3 Inlink.Field4
'Jun 08' '432' 'dkdfa' 'dlkjfd'
'May 08' '323' 'like' 'nike'
'Apr 08' '234' 'xmdjk' 'dkfadl'
I want to allow the June month records only not all the records, like
Outlink.Field1 Outlink.Field2 Outlink.Field3 Outlink.Field4
'Jun 08' '432' 'dkdfa' 'dlkjfd'
'May 08' '323' 'like' 'nike'
'Apr 08' '234' 'xmdjk' 'dkfadl'
I am using the following transform to get the previous month first date
Oconv(Iconv(InLink.Field1,'D MY[A3,2]'),'DYMD')
But how to get previous month +1 , month ? is there any functions like NEXTMONTH() as in oracle ? or how to proceed with this? any suggestions are welcomed
thanks in advance