Insert NaNs for certain rows based on date

What I want to do is pretty simple but I'm still getting used to programming procedures in Igor so thought it might be easier to ask for help here rather than re-inventing the wheel. Hypothetically, what I want to do is pretty simple. Say I have a wave called CONC and a corresponding date-time wave called DATETIME. For certain periods of time (e.g. between DATETIME1 to DATETIME2) I would like to turn the values of CONC to NaNs. What is the most efficient way to do this for multiple time periods? At the end of the day, I just want to omit the data for certain date-time periods. If I could even create a procedure that would pull up a window to input the different date-time ranges to omit, that would be even more useful. Ideally, the function would be a NaN inserter based on certain criteria. The dialog box would ask a few questions: (1) Name of criteria wave, (2) Name of target wave, (3) Name of newly formed wave, (4) criteria (e.g. datetime periods of NaN insertion). Thank you in advance for any input! Joe
CONC = (timewave > DATETIME1 && timewave < DATETIME2) ? NaN : CONC (I changed the name of the time wave from DATETIME to timewave because datetime is an Igor function)