Skip to main content
Solved

Error for Date Field when not filled out

  • July 21, 2023
  • 2 replies
  • 18 views

Forum|alt.badge.img+2

I have a field that shows the week of the year, but I break my records up sometimes by leaving some fields blank. How can I get rid of the #ERROR! message that is shown whenever there is no date (or week) in that field?

Here is the formula I use: 

DATETIME_FORMAT({Date to be Posted},"w")

Best answer by Jack_Manuel

You can wrap your formula in an IF() that checks if Date to be Posted exists, returns your formula if it does and returns blank if it doesn't.

IF( {Date to be Posted}, DATETIME_FORMAT({Date to be Posted},"w"), BLANK() )

  

2 replies

Jack_Manuel
Forum|alt.badge.img+18
  • Brainy
  • 80 replies
  • Answer
  • July 21, 2023

You can wrap your formula in an IF() that checks if Date to be Posted exists, returns your formula if it does and returns blank if it doesn't.

IF( {Date to be Posted}, DATETIME_FORMAT({Date to be Posted},"w"), BLANK() )

  


Forum|alt.badge.img+2
  • Author
  • New Participant
  • 2 replies
  • July 21, 2023

You can wrap your formula in an IF() that checks if Date to be Posted exists, returns your formula if it does and returns blank if it doesn't.

IF( {Date to be Posted}, DATETIME_FORMAT({Date to be Posted},"w"), BLANK() )

  


That worked! Thanks so much.