I need to convert and assign 24 hours date time value to custom date time field. For Example, in my apex code I am getting the date time value as ‘2019-03-12 14:38:00’, I need to convert and assign this value to custom date time field as 2019-03-12 02:38 PM in the Salesforce UI. The format methods that I used so far converts '2019-03-12 14:38:00' to '2019-03-12 10:38 AM' which is my user time zone.
I am not looking for time zone conversion, just format the date time.