Date Format - Transform your Dynamics Marketing Event Portal
In my previous article I showed you how to get yourself set up for making configurations to a Dynamics Marketing Event Portal so if you haven’t done that yet and have no idea what I am talking about - I suggest you head there first.
This is when the fun bit actually starts - where you see some real results and not just lines of code. This post will show you how to make a change on your Dynamics Marketing Event Portal that the majority of people outside of the United States will be screaming out for.
Change the date format from mm-dd-yyyy
The dream
I live in Australia - my environment is hosted here, my region settings are aligned accordingly, so surely the date on the portal should be that too? My dream looks like this
The nightmare
I don’t know about you, but the last time I checked there was only 12 months in the year - but this one seems to this there are up to 31 of them!? I know date formats is a contentious subject, but the date format needs to be supportive of the region and I live in the region where the DATE comes before the MONTH!
Making the dream come true
Assuming you completed the steps in my previous article you are ready to make your first portal improvement. The date settings (dateSettings) are stored in the environments.ts file.
1. Open the source code folder in Visual Studio
2. Navigate to the environments.ts file which you created and updated the apiEndpoint for.
3. Update the singleDateFormat in the environment.ts file
6. Press the ‘Play’ button
7. If you are lucky you might get this juicy error, take a moment for mild panic
8. Stick this juicy bit of code in Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
9. Select ‘Yes’ (at your own peril of course but I haven’t dropped dead yet #YOLO)
8. Press the ‘Play’ button again
9. Wait patiently and ignore all the warnings
10. Eventually you will be able to log in with your authentication details for the instance you are configuring
12. Go to your portal, do a Force Refresh aka Ctrl + F5 so that it clears the local cache and tadahhhhhh!
Well done if you made it this far - watch this space for more blogs on beautifying the Dynamics Marketing Event Portal soon. The date format is just the start! Want to do more changes? Have a browse of my other articles in this series and tell me about the magical things you have uncovered too!
If you are stuck on this journey too, and this doesn’t help just drop me a message or contact below - I cannot promise I’m a professional but I will give it my best!