Announcements
Hi
I'm using CRM 2011. Currently dates showing in short format but I would like to show it in long format
Any idea please?
*This post is locked for comments
which format you want, can you post example date format?
Hi Alaa,
You can go to the field properties and change the format there.
Hope that helps
Thanks
Hi,
Please refer below links.
www.microsoft.com/.../customize-your-regional-settings-number-currency-time-and-date-in-crm-for-outlook.aspx
social.microsoft.com/.../crm-2011-changing-date-format-globally
Mansoor
In my personal settings shows the following under English (united States):
Short format: M/d/yyyy
Long format: dddd, MMM, dd, yyyy
I want date to be showing in the long format where it's currently showing in short one
The date format is a personal setting for each CRM user. Each user can choose the date format they prefer based on the language list.
For CRM 2011 the option is under File -> Options -> Formats.
Below you can find the tool to change the setting programmatically for users
crm2011usersettings.codeplex.com
I think you have known how to modify the format, either through the System Setting or Personal Options, right?
Your problem is how to show it?
According to this link:
blogs.msdn.com/.../long-date-formatting-and-in-swedish-please-o.aspx
In the CRM View and Form, we can only see the short date format, so in CRM will only see the short date format, you need to code it if you want.
Thanks.
You got it - thanks Eileen
Could you refer me to any code sample that would achieve that.
I need to show the date format as something like : 'Wed. April 1, 2015'
Bess tregards
Here is the code to show Long Date for a given date.
function showLongDate(){ objDate = Xrm.Page.getAttribute("createdon"); // put your date field here if(objDate != null){ varDate = objDate.getValue(); varYear = varDate.getFullYear(); varMonth = varDate.getMonth(); arrMonths = new Array('January', 'February', 'March', 'April', 'May', 'June', 'Jully', 'August', 'September', 'October', 'November', 'December'); currDate = varDate.getDate(); currDay = varDate.getDay(); arrDays = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); formattedResult = arrDays[currDay]+', '+arrMonths[varMonth]+' '+currDate+', '+varYear; alert(formattedResult);
Xrm.Page.getAttribute("description").setValue(formattedResult); // change your field value here }}
Change the field values for the highlighted line
Before the code, where do you want to place?
I don't think you want to apply the code to all of the date field in CRM form/view right?
That's kind of over-effort I think.
And you also need to create one field, cannot be the datetime field to store the value.
Need you to reconsider the effort versus the outcome before you are thinking about the code.
Anyway, this is the good reference for the format you want.
msdn.microsoft.com/.../ff743760(v=vs.94).aspx
Hi Aileen,
I am also looking for this solution of displaying the long date in an Order form.
And i have just started using Dynamics 365 for 2 months now.
Is there any way we can achieve this without writing a code?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.