function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hello,
Can anybody tell how to get number of days within a given date range(date fields) in APex?
Thanks
date startDate = date.newInstance(2008, 1, 1) ; //or yourObject.DateField
date dueDate = date.newInstance(2008, 1, 30) ; //or yourObject.DateField
integer numberDaysDue = startDate.daysBetween(dueDate) ;
Have a look at
Date Methods
R.
date startDate = date.newInstance(2008, 1, 1) ; //or yourObject.DateField
date dueDate = date.newInstance(2008, 1, 30) ; //or yourObject.DateField
integer numberDaysDue = startDate.daysBetween(dueDate) ;
Have a look at
Date Methods
R.