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


Date/Time & Currency attributes passing incorrect formats to email template


I am passing data from a custom entity in CRM to create a 'Booking Confirmation Email'

I am passing a date/time and a Currency types, i.e. the date on which the booking is for and the amount the booking is for.

For the date, whilst we are in UTC/GMT+10, it appears that the underlying UTC/GMT value is being passed, which is significantly skewing all booking confirmation dates/times. Any booking set between 00:00 and 9:59am will be set 10hrs earlier, and thus impacting the date to go back one day also.

I am also seeing the date format being MM/DD/YYYY (i.e. US Format)
But even though we have settings to be English (Australia) formats for all dates (DD/MM/YYYY) the US format is seemingly overriding.

For the Currency data, even though the attribute is set to be to 2dp only, I am passed a value in to the email that is to 4dp, which for money oriented values for these booking confirmations just looks sloppy.

This is a significant issue for an Australian government department where this solution is being leveraged and it needs a resolution.
Closed Sep 19 at 1:11 PM by rtebar
This issue should be resolved using the functions ToLocalDateTime and ToString described in the last comment.