on 02-17-2015 12:38 AM
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.
Thanks
Nidhish
Hi Nidhish,
You are comparing two different things, you need both to be either Date or DateTimeZone.
Two options:
TO_DATE we are getting as in parameter
DateTimeZone currentDate = new DateTimeZone();
if(TO_DATE.before(currentDate)){
//Logic
}
Note: DateTimeZone is safer than Date if you use different time zones.
Regards,
HP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.