Link to home
Start Free TrialLog in
Avatar of Howard Bash
Howard BashFlag for United States of America

asked on

SharePoint 2013 Workflow dates

I have a "Start Date" column that is a single line of text and displays a value from an InfoPath date control .
In a workflow, I need to compare that value with "now" and if it is greater than or equal to "now" initiate a task.

The Now workflow variable gets it's value at the start of the WF as follows:
Set "CurrentTime" to Current Item:Modified and has the value in the format m/d/yyyy hh:mm A.
The "Start Date" column show the date string as yyyy-mm-dd

As a result of these differences, they never compare equal.

So,  I tried to build a Year variable, a Month variable and a Day variable from the Current Item:Modified column as follows:
  1. Copy from Current Item:Modified, starting at 1 for 4 characters (Output to Variable:CurrentYear)
  2. Copy from Current Item:Modified, starting at 6 for 2 characters (Output to Variable:CurrentMonth)
  3. Copy from Current Item:Modified, starting at 9 for 2 characters (Output to Variable:CurrentDay)
Thinking I can build a string in the format yyyy-mm-dd and then use that for compares.  I don't find a way to build this string nor am I sure if my approach will work.

Any advise on this would be appreciated.
Avatar of Ramkisan Jagtap
Ramkisan Jagtap
Flag of Finland image

what type of workflow you are using?
Avatar of Howard Bash

ASKER

SharePoint 2013 is the workflow type.
ASKER CERTIFIED SOLUTION
Avatar of Ramkisan Jagtap
Ramkisan Jagtap
Flag of Finland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Probably a solution