This ought to be really simple but I cannot suss it. I’ve looked at the help files for functions and also for nested if statements and no doubt the answer is in there, but I’m missing it.
I have a little to-do base. Task records have two date fields: Do_On and Do_By. A task can have values in one or both or neither of the fields. I’d like to look at the stuff on a calendar so I need a single date field I can map to the calendar. Do_On takes higher priority than Do_By, so in plain English, I’d like a calc that looks something like this:
If both Do_On and Do_By are empty, then return Blank()
If Do_On is NOT empty, return Do_On
If Do_By is NOT empty, return Do_By
I’ve tried various things but can’t make it work. For example I’m told this is invalid:
If ( Do_On != Blank() ; Do_On ; Blank () )
Of course that’s not all I want but I thought I’d try just that much, but still, no luck. Can’t tell if I’m supposed to format the date result and I’m doing that wrong or if it’s something else. This doesn’t work either:
If ( Do_On != Blank() ; DateTime_Format ( Do_On ; "MM/DD/YYYY" ) ; Blank () )
Be grateful if someone could throw me a clue.