locked
Format CRM date and time fields in email and SMS text messages

    Question

  • I have a workflow that sends an email and text mesasge to a client reminding them of an appointment.  Currently, this is sent to the client using the Start Time field of the entity Appointment  as date dd-mm-yyyy and time using the 24 hour clock (e.g. 13:45).  How could I format the email/SMS such that it would say for example 27th April at 1:45pm?
    Sunday, April 26, 2009 8:23 PM

Answers

  • Hi,

    1) You can set the date/time format in Settings area. This will change the system wide settings for dynamics CRM.
    2) There is no out of the box way to format date in dynamics CRM 4 workflows. Although you can write a custom activity that accepts date as input paramter and return a string representation of date in your required format. Then you can use that string in you messages.

    Ayaz Ahmad Technical Consultant | Dynamics CRM/MOSS | OA Systems Ltd | http://ayazahmad.wordpress.com
    Sunday, April 26, 2009 9:21 PM
    Moderator

All replies

  • Hi,

    1) You can set the date/time format in Settings area. This will change the system wide settings for dynamics CRM.
    2) There is no out of the box way to format date in dynamics CRM 4 workflows. Although you can write a custom activity that accepts date as input paramter and return a string representation of date in your required format. Then you can use that string in you messages.

    Ayaz Ahmad Technical Consultant | Dynamics CRM/MOSS | OA Systems Ltd | http://ayazahmad.wordpress.com
    Sunday, April 26, 2009 9:21 PM
    Moderator
  • Thanks Ayaz fot your guidance.  I tried option 1 but it seems not to have worked.  I'll look at the second option as that approach did cross my mind.

    Regards

    JIm
    Monday, April 27, 2009 8:25 AM
  • Hi Jim -

    We have the same question and I also don't see the answer in system settings.  Have you resolved it?

    Pam

     

    Monday, May 11, 2009 5:52 PM
  • Hi Pam

    I haven't yet cracked it, but if I do I'll post here.  It's one of the many jobs I need to do on our CRM and is a low priority at the moment.  I think the advice here may be of value which is to create another field which takes the data from the date field and formats it the way you like.  I would guess a Workflow on change of the date field and Javascript might sort the problem out.

    Good luck.

    JIm
    Monday, May 11, 2009 6:19 PM
  • Thanks Jim -

    I think we got it.  In system settings, choose time format - then make it h:mm, without the 'tt'

    thanks for the quick update.

    Pam

    Monday, May 11, 2009 6:23 PM