You need to sign in to do that
Don't have an account?
lady_syrenne
getting the first 90 days of the year in apex ,, URGENT!
Hi all!
Does anyone know how to get the first 90 days of the year in apex? I'm new to dealing with dates in apex... Pls. help for this is very urgent!
Thanks,
lady
Use this;
For more: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_date_functions.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_date.htm
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
All Answers
Use following code
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
This is good but can I do it dynamically? I think Date myDate = date.newinstance(1960, 2, 17) is sort of hardcoded date.. what if the year changes? can I do it without hardcoding dates?
Use this;
For more: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_date_functions.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_date.htm
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
Great Thanks for this!