locked
Format dates in an already existing field... RRS feed

  • Question

  • I have a field that is in "Single line of text" format. It is meant to be a date field. The field has been in use for about a month now and has data associated with it. Is there a way to have it format all the dates the same? Below are the itterations that exist currently:

    • m/d/yyyy
    • mm/dd/yyyy
    • mm/d/yyyy
    • m/d/yy

    You get the point. Is there a way to A. format the existing data to mm/dd/yyyy format and B. have all entries going forward formatted the same.

    Thursday, June 19, 2014 1:16 PM

Answers

  • For future entries you can create a javascript inside onchange event to enforce the format to mm/dd/yyyy

    for previous records you have 3 options:

    1) export the records in excel (with the option for reimport) edit the dates and import back

    2) create a console application that will fix the date format

    3) create a custom workflow activity that fix the date format a launch an ondemand workflow against the records

    Of course the easiest one is the first.

    But there is a reason you want to keep the field as text, you can't create a new date field and move the value to this new date field?


    My blog: www.crmanswers.net - Rockstar 365 Profile

    • Proposed as answer by Guido PreiteMVP Thursday, June 19, 2014 2:00 PM
    • Marked as answer by nasyrax Thursday, June 19, 2014 2:07 PM
    Thursday, June 19, 2014 1:25 PM

All replies

  • For future entries you can create a javascript inside onchange event to enforce the format to mm/dd/yyyy

    for previous records you have 3 options:

    1) export the records in excel (with the option for reimport) edit the dates and import back

    2) create a console application that will fix the date format

    3) create a custom workflow activity that fix the date format a launch an ondemand workflow against the records

    Of course the easiest one is the first.

    But there is a reason you want to keep the field as text, you can't create a new date field and move the value to this new date field?


    My blog: www.crmanswers.net - Rockstar 365 Profile

    • Proposed as answer by Guido PreiteMVP Thursday, June 19, 2014 2:00 PM
    • Marked as answer by nasyrax Thursday, June 19, 2014 2:07 PM
    Thursday, June 19, 2014 1:25 PM
  • What would be involved in creating a new date field and moving the existing values to the new date field? And please excuse this n00b question, but where might i find instructions on exporting/importing the data?
    • Edited by nasyrax Thursday, June 19, 2014 1:44 PM
    Thursday, June 19, 2014 1:41 PM
  • for export/import using excel you can check this video: https://www.youtube.com/watch?v=e6UAnSvuQHs

    You can also move the values to the new date field inside your excel file. First create the new date field, and fill one record of the one you need to update with a valid date inside the new field, after you export the records using excel, you edit the excel file filling the column of the new date field (paying attention at the format required, for this you set a valid date in one record before) save the file and import back. After you can delete or hide the previous field (paying attention if it was used in views or reports)


    My blog: www.crmanswers.net - Rockstar 365 Profile

    Thursday, June 19, 2014 2:00 PM
  • Thanks SOOO much for your help!
    Thursday, June 19, 2014 2:08 PM
  • One more thing. I have created a new field with the "Date and Time" format, but it is displaying dates as 6/8/2014, I need it to be 06/08/2014. I went into Administration>System Settings> and changed the format to be mm/dd/yyyy, but it still shows as m/d/yyyy when I select a date.
    Thursday, June 19, 2014 2:36 PM
  • The date format is a personal setting for each CRM user. Each user can choose the date format they prefer starting from a language list.

    to change the date format
    For CRM 2011 the option is under File -> Options -> Formats.
    For CRM 2013 you need to click on the rowel beside the image user on the top right corner, select Options and then Formats.

    There is also this utility to update the settings for all users programmatically:
    http://crm2011usersettings.codeplex.com/
    or
    http://crm2011silverlight.codeplex.com/


    My blog: www.crmanswers.net - Rockstar 365 Profile

    Thursday, June 19, 2014 2:38 PM