Forum Discussion

YehudahGreenber's avatar
YehudahGreenber
Qrew Assistant Captain
8 years ago

Workdate Formula Error

This formula, which is defining a formula workdate field, works fine, unless the end result is to pull  from a workdate field: 

If  ((Trim([Predecessors])="") and (IsNull([Start])), [Date Created],
[Start]
)

  If I replace the last "[Start]", which is a workdate, with "[Date Created]", then the formula works.  As is, though, I get a formula error for bad or missing function call. Is this a bug, or am I missing something?
  • Date Created is a date time/field type.  A work date does not have the concept of the time of day.

    Do you want your result to be a date or a date/time or a workdate?
  • YehudahGreenber's avatar
    YehudahGreenber
    Qrew Assistant Captain
    That's what is confusing me.  Date Created works fine in this formula, it's "start" that is giving me trouble.  For example, if I would get rid of the last line, it displays date created without a hitch.  (And it would functions a workdate is regards to predecessors.)
    The truth is that I WOULD like the best of both worlds- Date created (not a workdate) if no other date is defined, but otherwise, a workdate.
  • YehudahGreenber's avatar
    YehudahGreenber
    Qrew Assistant Captain
    Sorry for the gibberish in the parentheses.  Read:  It would function as a workdate in regards to predecessors.  
  • What happens if you convert the [date created] field to a date result with ToDate([Date Created])
  • YehudahGreenber's avatar
    YehudahGreenber
    Qrew Assistant Captain
    Mark, your comment spurred me to find a workaround.  I created another formula workdate field    "[Convert Date Created]"  with the formula ToDate([Date Created]), and then used this field instead of [Date Created].  I still don't understand the logic of the error, though.