This project has moved and is read-only. For the latest updates, please go here.

Date fields not staying in correct time zone



I am using this add-on to extract data from records in a custom entity and one of the fields is a date/time. The problem I am having is that when the date/time is sucked into the email it changes it from local time to UTC so all the times and dates are out by 11 hours.

Is there something that I need to add to the code in the email so that it corrects for local time?




sebw wrote Apr 28, 2015 at 3:17 PM


The new version 7_0_0_2 has new dynamic function ToLocalDateTime which takes name of the timezone that you want to convert to and you can do the following .

{ToString(ToLocalDateTime(createdon,\"GMT Standard Time\"),\"dd/MM/yyyy HH:mm\")}

fanar wrote Jan 13, 2016 at 7:14 PM


I've just downloaded version and testing it.
Waw, that's exactly the tool I was looking for, thanks !

Everything works fine except local date time conversion.

Using the above string
{ToString(ToLocalDateTime(createdon,\"GMT Standard Time\"),\"dd/MM/yyyy HH:mm\")}
I get an error : Unhandled Exception: Microsoft.Xrm.Sdk.InvalidPluginExecutionException: Input string was not in a correct format.

Using the same string without '\'
{ToString(ToLocalDateTime(createdon,"GMT Standard Time"),"dd/MM/yyyy HH:mm")}
no error but strange result : 'G1T SPan13ar13 Ti37e'

Any idea ?

wrote Jun 1, 2016 at 6:33 AM

wrote Sep 22 at 9:20 AM