How do logic checks against date stamps on the Rules page evaluate?

  • 1
  • Question
  • Updated 3 years ago
We're currently running a logic check against a date stamp variable (tstmp_submit) to trigger a rule in our applications. The logic rejects the application with an error if the date stamp is greater than the application deadline day.

Eg:
if (tstmp_submit > "8/16/2015")
{
    error("The 15FAL application is closed.  Please submit your application for the next available term.")
}

Unfortunately, students who apply on 8/16/2015 are triggering the rule and being rejected.

We will be re-writing the rule to something like "if (tstmp_submit >= "8/17/2015")", but can you clarify how date stamps are evaluated?

Is there an implied time associated with the date and if so, is it 00:00 or 23:59?
If there is an associated time, can you please include an example of how to include the time with the date in the example text on the Rule page?

Thanks!
Photo of William Diehl

William Diehl

  • 47 Posts
  • 5 Reply Likes

Posted 4 years ago

  • 1
Photo of Patty - OpenCCCApply Product Manager

Patty - OpenCCCApply Product Manager, Official Rep

  • 302 Posts
  • 15 Reply Likes
Hi William,

Unfortunately, you won't be able to use the tstmp_submit field in a Rule at all. The tstmp_submit field is calculated at the time the application is submitted - and therefore will never be applicable in a Rule inside the application. Does that make sense? The time stamp submit date isn't determined until the moment the application is submitted - which is beyond when the rules are trigger.

Also, I'm curious - why would you want to create a rule just to tell a student to apply to another Term? All you have to do is "close" that Term by going into the Administrator - Terms tab and setting the close date (which means the last date you will be accepting applications to that Term) to the date you choose. This is more efficent and will force the student to choose another Term.

You should message your student on your website if the Term is closed and which Term they should choose in that event - otherwise they will call the Help Desk looking for support. The Help Desk will not have that information because every college sets their Term open and close dates differently, as well as the actual start and end dates of a specific Term.

I hope this helps. Thanks!

Patty
Photo of William Diehl

William Diehl

  • 47 Posts
  • 5 Reply Likes
Patty,

Thanks very much for the rapid response! We've had excellent success using the tstmp_submit field in our rules thus far, with the only problems so far being the logic evaluation mentioned in my question. Your statements suggest this is unexpected behavior, so please let us know if in fact that field is not intended for use in Rule statements (and if that's the case, why it's available to select) or if it will be removed in the future (as we hope not! because we have a strong need for it).

Our campus requires the term application period to remain open beyond the deadline for certain program specific exceptions so we must set the Rule to do the actual deadline enforcement. Students are still able to create an application for the term but unless they meet the conditions of the Rule, they are stopped at the submission step with the error message defined in the rule. It's worked quite well for several terms and gives us the flexibility we need to have differing deadlines for our programs. We feel the error message is sufficiently explanatory to alert the student to the cause of the failure.

Could you clarify whether there is in fact a time associated with a logical comparison of the date value stored in tstmp_submit and what that value is? I believe there must be, as I can see not only a date but also a time if I modify the default display values of the students' fields in a report. This is the only explanation I can think of why an application submitted on 8/16/15 would fail our logic test as the date alone would not be sufficient to cause the rule to fail.

The other problem we had is that the Rule testing area of the definition screen suggests the rule will work as expected when entering a date. This led us to believe we had the correct logic when in fact the test screen was just using the default time value and comparing "8/16/15 00:00" > "8/16/15 00:00". The rule would fail however for any time after 00:00 which we have no way of testing nor any example.

At this point, we've already updated our logic to a >= comparison for the day after the deadline, so the discussion is mostly academic, but I was hoping for a clarification if possible. Thanks as always for your very excellent responses!!

William Diehl
Norco College
Photo of William Diehl

William Diehl

  • 47 Posts
  • 5 Reply Likes
Patty,

Just another interesting observation... I'm not sure if it's just the rule testing section of the rules definition page or if it can be seen in actual implementation, but a simple date test like that below also shows some problems:

if (birthdate == "01/01/2001")
{
    error("Match!")
}

One would expect the error message to display with a test value of "01/01/2001"... However, it does not.

It is necessary to add a time value to the test data field of at least 01:00:00 (any value between 00:00:00 and 00:59:59 will also fail). This can be done by using "01/01/2001 01:00:00" in the test data field.

This suggests that date values in logic checks have an implied time stamp associated with them of 01:00:00 (1:00 AM). Can you test and let me know if you're seeing the same thing?

Thanks!!
Photo of Patty - OpenCCCApply Product Manager

Patty - OpenCCCApply Product Manager, Official Rep

  • 302 Posts
  • 15 Reply Likes
Hi William,

I'm going to have to pass this over to the support team to research. I'm not sure how to answer either of your follow up questions. I assumed (never a good idea) that a submission date stamp would not be available in a Rule since the stamp won't register until the student actually hits "submit".  Many students start applications and then stop mid-way through (save) and resume at a later time. The submit date doesn't calculate until they get past the submission page and finish the application.  This is why I assumed that building a rule around that stamp wouldn't work.

Hearing that this HAS worked for you in the past is something the development team will have to research. I will have our College Support Tech enter a ticket and push this into their queue. They have 24 hours to respond.

Regarding the timestamp addition to the date stamp is another area they will have to respond to. 

Thanks for your patience. We'll get back to you.
Patty
Photo of Merrie Wales

Merrie Wales, Official Rep

  • 880 Posts
  • 47 Reply Likes
William,
Patty forwarded these logic requests on to the Support Team, and I just wanted to let you know I will be doing some follow- up on both of your "logic" inquiries. Once we have some more definitive answers we can update this stream so other Colleges can share in the results.
mkw
Photo of William Diehl

William Diehl

  • 47 Posts
  • 5 Reply Likes
Great, thanks! I really appreciate it!
Photo of William Diehl

William Diehl

  • 47 Posts
  • 5 Reply Likes
Just following up on this issue. We ran into another situation using rule checks against the "birthdate" field. A simple check along the lines of "if birthdate == "01/01/1999" will fail even when the value is equal to "01/01/1999". We have to resort to something along the lines of "if birthdate >= 01/01/1999 and birthdate < "01/02/1999" to get a correct evaluation. Any status update? Thanks!
(Edited)
Photo of William Diehl

William Diehl

  • 47 Posts
  • 5 Reply Likes
Hi Merrie, just wanted to see if there had been any progress on this issue? We use date checks in a lot of our rules processing and our 16SPR/16WIN terms were just negatively affected by this issue...

Another weird example I've found is a date check against some dates in 2016. For example a check against (birthdate >= '02/02/2016') will fail for most dates from today (10/01/2015) forward, instead of only those dates on or after 02/02/2016.
The same check against a prior date (eg, birthdate >= '02/02/2015') works as expected. These tests were done in IE, Firefox, and Chrome.

Finally, my testing seems to indicate that the default hour for a date match to occur is at 01:00:00. So, technically, the time between 00:00:00 and 00:59:59 will still fail to trigger a check like (tstmp_submit > '01/01/2015') when checked during those hours. This should probably be changed to 00:00:00 to work as expected.

Any update would be greatly appreciated :) Thanks!!
Photo of Mirna Duarte

Mirna Duarte

  • 31 Posts
  • 0 Reply Likes

Hello,

Was there ever a resolution to this? My institution also needs a method to do date checks, particularly to check for age at RDD.  I know there are fields such as dependent_status that check for under 19yrs of age but we need to check for  under 20yro.  This would work better if we didn't have to use a static date that would have to be updated every term.

Thanks in advance,

Mirna Duarte,
State Center CCD

Photo of William Diehl

William Diehl

  • 47 Posts
  • 5 Reply Likes
I'm not sure if anything official has been released or not... I still used date checks in my rules, but test them pretty thoroughly before saving and activating them... paranoia is still there, but so far the rules have been working properly (although, they still evaluate the start of the day as being 01:00 instead of 00:00).