Skip to Content
0
Former Member
Feb 17, 2015 at 12:38 AM

Date comparison in Redwood Script

59 Views

Hi,

I want to compare todays date with what user selects the date as part of in parameter for the JOB.


Please find the below logic which i am using, but Iam getting error for the same. Please let me know how to compare the date between Java.util.Date and com.redwood.scheduler.api.date.DateTimeZone.


TO_DATE we are getting as in parameter

currentDate = new Date();

if(TO_DATE.before(currentDate)){

//Logic

}

I am getting the below error.

JCS-102183: Compile failed for Job Definition Z_Script_Audit_Security_NC2 (Latest Version): Z_Script_Audit_Security_NC2.java:user code 105:25:after(com.redwood.scheduler.api.date.DateTimeZone) in com.redwood.scheduler.api.date.DateTimeZone cannot be applied to (java.util.Date) if(TO_DATE.after(currentDate){

Thanks

Nidhish