You need to sign in to do that
Don't have an account?
Ishan Singh 4
I have a formula field of type date. I want a task to be created using batch class when the date in formula field is today. But my code is not working
Date Todaydate =system.today();
if ( l.Age__c == Todaydate)
Age__c is formula field
my query parameter is correct
Using debug log I found code is not going below "if"
if ( l.Age__c == Todaydate)
Age__c is formula field
my query parameter is correct
Using debug log I found code is not going below "if"
Maybe you are not even getting inside de batch at all or the "I" record is not filling properly.
Please post entire code relevant to the issue so I can help better.
Also like or mark as correct if i am being helpfull, it may help others.
When datetime value compares date value, it won't have parsing issue. But you won't get the expected result.