You need to sign in to do that
Don't have an account?
dev_smile
Truncate timestamp from date Instance
How to truncate the timestamp from the date object so that the return type is again a valid date which has to be passed to a query to get the result from database.Since in database it is stored without timestamp.
You can try date.valueof(datetime field)
Thanks
Arvind
Datetime dt = yourdatetime;
Date dateval = date.newInstance(dt.year(), dt.month(), dt.day());
I think this should work