You need to sign in to do that
Don't have an account?
Ami Panda
How to insert date format while querying using apex class
if(string.isBlank(searchKey)){
lstOfGroup = [select Id,Name,CreatedDate from Group where Id IN: lstOfGroupIds ORDER BY NAME ASC LIMIT 500];
system.debug('GroupNames>>' + lstOfGroup);
}
This "CreatedDate" should be in "dd-mm-yyy" format..
lstOfGroup = [select Id,Name,CreatedDate from Group where Id IN: lstOfGroupIds ORDER BY NAME ASC LIMIT 500];
system.debug('GroupNames>>' + lstOfGroup);
}
This "CreatedDate" should be in "dd-mm-yyy" format..
Reger this link
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_format.htm
Below Query can fulfill your requirements. Hope this will work for you.
Please mark this as best answer if this solves your problem.
Thank you
Ajay Dubedi