Forum Discussion
Formula for CustomField which will check if date field [Start9] has a date entered - problem
- Jul 06, 2023projectfun --
The easiest way to test if a default or custom field contains a date is to use the ProjDateValue function, such as in the following example:
IIf([Start9]=ProjDateValue("NA"),"No Date","Has a Date")
Hope this helps.
Dale has already answered your question perfectly. There are other ways to identify NA in a date field. In project environments where MS Project's versions in multiple languages are used, you need to replace "NA" string with the proper one in all formulas. MS Project does not touch the strings (characters enclosed with double quotes) while performing replacements based on the language of the product. So if you do not want to edit the formulas each time you pass mpp files containing date-related formulas to the other users in the team, you can use a simple comparison [Start9] = [Date10], provided that Date10 is always blank since it should be intentionally left blank/reserved for date comparisons. You can even rename it as NA, so that the expression becomes [Start9] = [NA]. But renaming is for us to make it easy to find it in the field list, otherwise MS Project does not keep the new name in the formula. At least, it will be easy while entering the formula for the first time.