View By Date From Subject Field

I have created a View with a formula below:

SELECT @Contains(CurrentEditor; “Card.IBM.CCB”) & (@Contains(@UpperCase(Subject); “PIC”) | @Contains(@UpperCase(Subject); “REINSTALL”))

Along with this, I also want to be able to extract a date in the Subject field (mm/dd/yy) if Date matches current date or is 1 day after current date THEN display matches. I don’t know how to extract this when the date can be typed in any position with other wordings. I hope someone has code they don’t mind sharing with me. Also, should this be coded in the Initialize View along with the formula?

Also, please bear with me since I am not a Lotus Notes developer.

Subject: View By Date From Subject Field

You can extract the date from the subject field by using the following code:

month := @Trim(@Middle(Subject; “/” ; -3));

day := @Middle(Subject; “/” ; “/” ) ;

year := @MiddleBack(Subject; “/” ; 4 ) ;

subjectDate := @TextToTime(month + “/” + day + “/” + year) ;

Note that this will only work if the date in the subject is in the format mm/dd/yyyy (i.e. U.S. dates). If your application is international then you will need to have all dates in subjects stored in the international standard of yyyy/mm/dd to avoid confusion and modify the above code accordingly.

Also, it is not recommended to have views’ selection formulas compute based on @Today. See the Forum FAQs as to why this is not recommended and ways to work around it.

Good luck.

Subject: RE: View By Date From Subject Field

Thank-you very much for your help!