function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shivani GadgeShivani Gadge 

I want date format as('dd/MM/yyyy hh:mm:ss a')

 appDocumentCategory.Received_Date__c=System.now();
 
above is my code i want date format as ('dd/MM/yyyy hh:mm:ss a') but when I'm doing I'm getting error for datatype because  appDocumentCategory.Received_Date__c is in datetime datatype.
 
Can anyone help me please?
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Shivani,

Can you check if the below link helps you to get the solution.

https://salesforce.stackexchange.com/questions/146952/system-vs-date-datetime-class

If this helps, Please mark it as best answer.

Thanks,
 
Shivani GadgeShivani Gadge
Thank you but i want time in IST format its not going to help!