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
Datetime dt = (Datetime)Account.Start_Date__c; Date ModifiedDate = dt.Date();
Datetime dt = (Datetime)Account.Start_Date__c; Date d = dt.format('MM/dd/yyyy');
Greetings to you!
Date() is used to get the date from datetime field.
format() method returns the Date as a string using the locale of the context user.
Please refer to the below links which might help you further.
https://developer.salesforce.com/forums/?id=9060G000000UWWyQAO
https://salesforce.stackexchange.com/questions/201509/how-to-convert-datetime-datatype-to-date-format-only
https://salesforce.stackexchange.com/questions/15103/i-want-to-access-only-date-form-datetime
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas