Sharepoint - Check for empty date in SPD Workflow
I tried logging the date string values before executing the creation of the listitem in the "Project Scheduling" calendar but the workflow would error without logging. Then I removed the listitem creation part and the logging worked. It was there that I noticed that the date values were set to 1/1/0001 12:00:00 AM.
I found the same problem on Cliff Chaney's Blog and he provided the solution of:
- Converting the date to a short date
- Storing the date in a string workflow variable
- Comparing the string workflow variable to "1/1/0001"
Since a date field defaults to 1/1/0001 12:00:00 AM, to check for null dates set the workflow to check to see if the specified field date is less than the Created date. If the date field is less than the Created date then you know the field is empty.