1. The query first checks if the first 4 characters of the field "FinalizeDate" are equal to "2020".
2. If the condition in step 1 is true, then it converts the "FinalizeDate" to a date format using the DateTimeParse function and then formats it to display only the month and day in the format "MM/DD".
3. If the condition in step 1 is false, the query then checks if the first 2 characters of the "FinalizeDate" are less than "14".
4. If the condition in step 3 is true, it extracts the first 5 characters of the "FinalizeDate".
5. If both conditions in step 1 and step 3 are false, the query simply formats the "FinalizeDate" to display only the month and day in the format "MM/DD".
6. The final result will be based on the conditions met in steps 1, 3, and 5.
I think this can be done in fewer steps. Thoughts?
Solved! Go to Solution.
@Ben_D_S What is the format of the field FinalizeDate? Can you provide a sample data
@Ben_D_S Assuming the date format is like YYYYMMDD . in the third condition are you checking the first 2 characters or 3-4 characters ?
2 characters
I mean first two positions or 3rd and 4th position? also what is your input date format?
YYYY-MM-DD HH:mm:ss. And first two positions