Answers.Body: <p>I recall we've experienced this for quite a number of fields in Advanced Search. Some of them are - <code>Event Dates</code>, <code>Registration Dates</code> and some date filters in Case section.</p>
  
  <p>I did a patch to fix this for us but missed to update core for some reason. If the above fields fail for you, can you try applying <a href="https://github.com/civicrm/civicrm-core/pull/11486" rel="nofollow noreferrer">this patch</a> and see if it works for you?</p>
  
  <p>Opened a <a href="https://issues.civicrm.org/jira/browse/CRM-21623" rel="nofollow noreferrer">JIRA</a> for this issue with a PR <a href="https://github.com/civicrm/civicrm-core/pull/11486" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/11486</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-04T16:16:59.533Z
Answers.Text: Thanks! The patch works! I wasn't ready to open a JIRA myself since it was supposedly fixed before, so thanks for your efforts on fixing it. One ... quirk ... though: while the saved search/smart group keeps the relative date, the text describing what the search is (when viewing the list of names) does not use relative language, i.e. <<Start Date - greater than or equal to "January 4th, 2018 12:00 AM" ...AND... End Date - less than or equal to "March 4th, 2018 11:59 PM">> rather than <<Event Date - Next 60 days>>. Not a big deal, but potentially confusing for users.
Answers.UserDisplayName: Phil Morice Brubaker
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-05T03:35:03.453Z
Answers.Text: ok, in my view, it actually provides more information, so that a user is known about the dates considered in the relative filter `This Month`, `This quarter`, etc. I personally like this date display rather than seeing the string filter I selected :-)
Answers.UserDisplayName: jitendra - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-05T15:26:17.867Z
Answers.Text: I can see it both ways. I guess in my context where I don't have confidence that the search is saving the dates correctly, having hard dates displayed with the results doesn't increase my confidence that it is working properly.
Answers.UserDisplayName: Phil Morice Brubaker
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-04T03:14:36.847Z
Answers.LastActivityDate: 2018-01-04T11:31:24.327Z
Answers.LastEditDate: 2018-01-04T11:31:24.327Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>There is a history of a bug in which Smart Groups do not store the proper relative date ("Next 60 days") criteria, but rather convert the relative date into a hard date ("3 Jan 2018" to "4 Mar 2018"). This bug was noticed starting with v. 4.7.x and was. <a href="https://issues.civicrm.org/jira/browse/CRM-19394" rel="nofollow noreferrer">supposedly fixed in 4.7.13</a> I'm still having this issue in 4.7.27 (Joomla 3.8.2).</p>
  
  <p>Anyone else notice this recurring? Any advice?</p>
  
Tags: <smartgroups><dates>
Title: Smart Group relative date criteria not saving
ThreadText: # Smart Group relative date criteria not saving
  
  (Asked by: username_0 on 2018-01-03)
  
  There is a history of a bug in which Smart Groups do not store the proper relative date ("Next 60 days") criteria, but rather convert the relative date into a hard date ("3 Jan 2018" to "4 Mar 2018"). This bug was noticed starting with v. 4.7.x and was. [supposedly fixed in 4.7.13](https://issues.civicrm.org/jira/browse/CRM-19394) I'm still having this issue in 4.7.27 (Joomla 3.8.2).
  
  Anyone else notice this recurring? Any advice?
  
  **Tags:** smartgroups, dates
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-01-04. Score: 5 | Accepted answer
  
  I recall we've experienced this for quite a number of fields in Advanced Search. Some of them are - `Event Dates`, `Registration Dates` and some date filters in Case section.
  
  I did a patch to fix this for us but missed to update core for some reason. If the above fields fail for you, can you try applying [this patch](https://github.com/civicrm/civicrm-core/pull/11486) and see if it works for you?
  
  Opened a [JIRA](https://issues.civicrm.org/jira/browse/CRM-21623) for this issue with a PR <https://github.com/civicrm/civicrm-core/pull/11486>.
  
  > **Comments:**
  > **username_0**: Thanks! The patch works! I wasn't ready to open a JIRA myself since it was supposedly fixed before, so thanks for your efforts on fixing it. One ... quirk ... though: while the saved search/smart group keeps the relative date, the text describing what the search is (when viewing the list of names) does not use relative language, i.e. <<Start Date - greater than or equal to "January 4th, 2018 12:00 AM" ...AND... End Date - less than or equal to "March 4th, 2018 11:59 PM">> rather than <<Event Date - Next 60 days>>. Not a big deal, but potentially confusing for users.  
  > **username_1**: ok, in my view, it actually provides more information, so that a user is known about the dates considered in the relative filter `This Month`, `This quarter`, etc. I personally like this date display rather than seeing the string filter I selected :-)  
  > **username_0**: I can see it both ways. I guess in my context where I don't have confidence that the search is saving the dates correctly, having hard dates displayed with the results doesn't increase my confidence that it is working properly.  
  
  ---
  
  