+ 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!