Create a workflow assembly, which takes a string as input parameter and return date as output parameter. Here is code..
using System;
using System.Activities;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Workflow;
namespace DialogDate
{
public class DialogDate:CodeActivity
{
protected override void Execute(CodeActivityContext executionContext)
{
// Create the context
//IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
//IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
//IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
string sdate = StringInput.Get<string>(executionContext);
DateOutput.Set(executionContext, DateTime.Parse(sdate));
}
[Input("string")]
[Default("10/11/2010")]
public InArgument StringInput { get; set; }
[Output("Date")]
[Default("01/01/01")]
public OutArgument DateOutput { get; set; }
}
}
Call the assembly and pass the date string and use the return value to set the date field as shown in screen shots below.