web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How do I create a workflow that updates a date field based on text field?

(0) ShareShare
ReportReport
Posted on by

Hello,

I have a hidden text field in my CRM Opportunity entity called "QW_RenewalDate" that gets populated based on a date field in QuoteWerks.  I have a 2nd field on my form called "New_RenewalDate" that has a "Date" data type.  How do I create a workflow that updates "New_RenewalDate" when the text field "QW_RenewalDate" gets populated or updated?  Is it possible to convert the data in the text field to a date field using a workflow?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Pawar Pravin Profile Picture
    5,237 on at

    Hi,

    I think you should go through JS, its much easy to convert text to date in JS.

  • Community Member Profile Picture
    on at

    Hi @Pravin,

    Any advice or sample code on how I can do this using JS?  I have no experience with JavaScript.  Thanks!

  • Verified answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    You could use the following Workflow Data Time utility to convert the date in text field to date time value using ToDateTime

    github.com/.../CRM-DateTime-Workflow-Utilities

    You could do this using your own code but this utility is very useful to deal with date-time values so it might be work importing this tool and using in a workflow to conver the value.

  • Community Member Profile Picture
    on at

    Hi Kokulan,

    Thanks so much for sending this!  I imported the workflow and tried to create this workflow.  However, I'm still running into an issue.  Below is my workflow:

    7183.Attachment1.PNG

    In the first step, I selected "IsDateTime" and set the qw_renewaldate field, which is a text field, as the field I want to convert to a date.

    In the 2nd step, I am updating the new_renewaldate field.  However, I'm still not seeing the qw_renewal date field in the dropdown, which is the field I want to update (The "Renewal Date" field shown in the dropdown below is the new_renewaldate field, not the qw_renewaldate field).

    Am I doing something wrong here?  Thanks!

     7183.Attachment1.PNG

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    You have to use ToDateTime not IsDateTime.  Do you not have ToDateTime in the list of available steps?

    For the second step, the for Look For dropdown you have to select Date conversion step under local variables area.  Once you selected, the converted datetime value will be available for you to set to the new_renewaldate  field.

    new_renewaldate field will be on the form area in the workflow designer and you just have to set the output value from ToDateTime CWA.

  • Community Member Profile Picture
    on at

    Hi @Kokulan,

    I was able to get this to work by switching to "ToDateTime", as you suggested.  Thank you so much for your help on this issue!

  • Suggested answer
    Goutham A Profile Picture
    2 on at

    The simplest way is that you can use a Business Rule , which is OOB.

    Please refer below

    https://community.dynamics.com/crm/f/117/t/266309

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans