@ emre this is a possible issue, it broke ages ago i just didnt have the time to look at it and work it out.
You originally gave me the rule and constraints to check that a date of birth entered (stored as a ticket tag) was valid or not with the following rule, checking the date entered against the current date made the person 18 or over
That rule used to work but during an update ages and ages ago it broke and it seems it can no longer distinguish between BEFORE and AFTER in the rule to determine if the age is before or after 18
I have just started from scratch and rebuilt it and im getting the same issue, this is my new rule
So if the date of birth entered as a ticket tag is AFTER todays date minus 216 months this makes them younger than 18 therefore the date of birth entered is invalid
However it doesnt matter if i enter a date younger or older than 18 years it always says its invalid so either the forumlas are wrong (but in my original emre gave me the formulas and it did work) or an update has broke the flow with BEFORE and AFTER in the way we were using it
I changed the second part (to the right of AFTER) to strip the time out and that works fine [=FD(ADM('{DATE}',-216),'dd-MM-yyyy')] in a show message displays:
I would imagine before after requires specific date format.
You have tag in straight unformated number and calculated date formatted dd-MM-yyyy
From my experiance with dates it usually works out easier to convert dates to the ‘timestamp’ millisecconds since whenever it was and do larger/smaller than. Not sure if there is a helper to this, might need to use script.
If not i run a few tests on what format dates would be expected to be in.
I think again based on my date dealings that it needs to either match sql format of yyyy-MM-dd or system format in windows. Dates can be a real PITA for comparisons hence why i did most of mine using raw timestamp millisconds format and just converted to dd/MM/yyyy for human reading.
I intentionally entered month and day values as 5 to skip date format issue. You required date format starts with day but your SambaPOS date format may start with month.
[?Enter Customer's DOB (8 Digits);((0?[1-9]|[12]\d|30|31) (0?[1-9]|10|11|12) \d{4})?;{TICKET TAG:Customer's D.O.B};N;49,50,51|52,53,54|55,56,57|8,48,13]
You can check Ticket Explorer to see which date format SambaPOS actually using.
At the moment the doesnt fir at all if the date is invalid or valid, if i change BEFORE to AFTER then if fires everytime whether the date is valid or invalid
I cant see where the date format is wrong or what to change it to??
It gets tagged with no formatting so today for example would show on the tag as 29082018
I’m guessing it’s because that format isn’t the same as the format shown in rocket explorer? But don’t know how to change the mask so the tag is entered as 29.08.2018, the same format as ticker explorer?