You need to sign in to do that
Don't have an account?

How to convert an Event EndDatetime to "dd-mm-yyyy"
Hi all,
unfortunately I couldn't find a solution to this.
I have the following code:
I can save the event through Apex, but my subject appears as: Visit Test2 2017-05-31 10:00:00 (for example)
My Salesforce application timezone looks like this:

In Spain we use to set the date dd/mm/yyyy or dd-mm-yyyy, but we need the application in English because our users require this.
Any idea how to convert the EndDateTime.
I would appreciate any help.
unfortunately I couldn't find a solution to this.
I have the following code:
Datetime eventdate = event.EndDateTime; String dateOutput = eventdate.format('dd-MM-yyyy'); event.Subject = 'Visit ' + acc_name + ' ' + eventdate;Event has a field EndDateTime which is a Date Time type, but what I want is to convert that format to "dd-mm-yyyy".
I can save the event through Apex, but my subject appears as: Visit Test2 2017-05-31 10:00:00 (for example)
My Salesforce application timezone looks like this:
In Spain we use to set the date dd/mm/yyyy or dd-mm-yyyy, but we need the application in English because our users require this.
Any idea how to convert the EndDateTime.
I would appreciate any help.