SBX - Search With Button

SBX - Forum Post Title

Date Time in Workflows

Microsoft Dynamics CRM Forum

J. See asked a question on 19 May 2017 3:44 AM
My Badges

Question Status

Verified

Hi!

I currently have a workflow that updates the name of the record based on a datetime (Date Only) field. However, the time is also included in the name as per screenshot below. Is there anyway for me to remove the time in the name and only display the date?

Thanks in advance!

Reply
mydoll responded on 19 May 2017 4:04 AM
My Badges

Hi

Do you have this datetime stored as a variable of or a field on a form?

Reply
Himanshu Prajapati responded on 19 May 2017 4:06 AM
My Badges
Verified Answer

Hi J. See,

You need to write custom workflow activity that returns truncated string having only date and use that string in naming.

Otherwise, you can also write Pre-Operation Plugin for Naming.

Mark this as answered if it helps.

Thanks & Regards,

Himanshu Prajapati

Reply
M N responded on 19 May 2017 4:23 AM
My Badges
Verified Answer
J. See responded on 21 May 2017 6:32 PM
My Badges

Hi mydoll,

Yes, date is actually stored in a field as per screenshot in my post.

Reply
Chadi Tannous responded on 21 May 2017 7:11 PM
My Badges
Verified Answer

you can use the out of the box workflow activity to get the date formatted.

Reply
J. See responded on 21 May 2017 7:29 PM
My Badges

Hello Chadi,

I do not see that option in my workflow steps. Is there anything I need to install or update in my d365 environment?

Reply
Chadi Tannous responded on 21 May 2017 7:31 PM
My Badges

what CRM version are you using ?

Reply
J. See responded on 21 May 2017 7:32 PM
My Badges

I'm using Dynamics 365 Online

Reply
Chadi Tannous responded on 21 May 2017 7:40 PM
My Badges

Microsoft usually create them when you install additional products into your CRM instance. for the date format it  seems that they install it with project service

Reply
Chadi Tannous responded on 21 May 2017 7:40 PM
My Badges

However you can create your own workflow activity that will give you the same result

Reply
J. See responded on 21 May 2017 7:50 PM
My Badges

Yes, I checked my other environment which has project services and it does have the additional steps in the workflow. Thanks! It's nice to know that there is also an OOB way to proceed with this!

Reply
Himanshu Prajapati responded on 19 May 2017 4:06 AM
My Badges
Verified Answer

Hi J. See,

You need to write custom workflow activity that returns truncated string having only date and use that string in naming.

Otherwise, you can also write Pre-Operation Plugin for Naming.

Mark this as answered if it helps.

Thanks & Regards,

Himanshu Prajapati

Reply
M N responded on 19 May 2017 4:23 AM
My Badges
Verified Answer
Chadi Tannous responded on 21 May 2017 7:11 PM
My Badges
Verified Answer

you can use the out of the box workflow activity to get the date formatted.

Reply

SBX - Two Col Forum

SBX - Migrated JS