cancel
Showing results for 
Search instead for 
Did you mean: 

Date Issue

former_member10771
Active Participant
0 Kudos

HI,

In my scenario of IDOC to file , there are two input dates start and end date . I need to compare whether these two dates lie within the range of the current date . I mean start date <= current date and end date >= current date then i need to create the segment else it should not be created.

I have tried this using the standard function .I need some help whether we need to go for a UDF for this .

Can anyone send me UDF details on this one.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Don't post multiple question for the same ..

Check with the node functions . U have BeforeDate , AfterDate .CurrentDate . If condition , and CreateIf .

Using this you can achieve ur goal , just try .

Don't go for UDF Unnecessary.

B.Jude

Answers (5)

Answers (5)

former_member10771
Active Participant
0 Kudos

Thanks for the inputs. My problem has been solved.

sabyasachi_mohapatra3
Participant
0 Kudos

Hi Amit

you can try & use the folllowing java code

import java.util.Date

Date currDate = new Date();

int i,j;

i = startDate.compareTo(currDate);

j = endDate.compareTo(currDate);

if ((i<=0) & (j>=0)){

resultlist.addValue(' ');

else

resultlist.addSuppress();

}

former_member10771
Active Participant
0 Kudos

Hi

Thanks for your replies .Points are been awarded.

Thanks

Former Member
0 Kudos

Hi Amit,

You can do it using standar functionality, do like below ,

u have to use createif function and date function.



start date-> ( Equals)-> current date 
                                                         or   ->
start date-> ( BeforeDate)-> current date
                                                                       and    ->  creteif   ->  target Node

end date-> ( Equals)-> current date 
                                                          or   ->
end  date-> (AfterDate)-> current date


Hope this will help you !!

Regrad

Biplab

former_member10771
Active Participant
0 Kudos

HI ,

This works for few conditions and fails for a few using graphical mapping.

So I want to go for an UDF ..

The condtion is

Startdate <= Currentdate and Enddate >= current date

then pass value

else

do not pass

I need to put this logic under a UDF ..

Can anyone please help on this one