Shoppingcart Employee Prolongation - Check exitdate

Hey there,

i have build a validationcheck in the webdesigner like the following examples.

Example 1

if(SingleProperty("AccProduct", "ident_accproduct", format("uid_accproduct = '{0}'",
 from ShoppingCartItem select current UID_AccProduct)) = GetConfigParm("Custom\IT-Shop\SpecialProducts\EmployeeProlongation")) then
(from ShoppingCartItem select current FormatDate(ccc_exitdate, 'yyyyMMdd') <= FormatDate(getdate(), 'yyyyMMdd') and DATEDIFF(day, getdate(), ccc_exitdate) > '365')

Example 2

if(SingleProperty("AccProduct", "ident_accproduct", format("uid_accproduct = '{0}'",
 from ShoppingCartItem select current UID_AccProduct)) = GetConfigParm("Custom\IT-Shop\SpecialProducts\EmployeeProlongation")) then
(from ShoppingCartItem select current FormatDate(ccc_exitdate, 'yyyyMMdd') <= FormatDate(getdate(), 'yyyyMMdd') and FormatDate(DateAdd(yy, -1, GetDate()), 'yyyyMMdd'))


The function datediff and dateadd does not exists in websql.

How can i check if the selected date is more than one year in the future or not.

i am excited to hear some nice idea for this problem.

best regards

  • sorry here the corrected version of Example 2

    if(SingleProperty("AccProduct", "ident_accproduct", format("uid_accproduct = '{0}'",
     from ShoppingCartItem select current UID_AccProduct)) = GetConfigParm("Custom\IT-Shop\SpecialProducts\EmployeeProlongation")) then
    (from ShoppingCartItem select current FormatDate(ccc_exitdate, 'yyyyMMdd') <= FormatDate(getdate(), 'yyyyMMdd') and FormatDate(ccc_exitdate, 'yyyyMMdd') > FormatDate(DateAdd(yy, 1, GetDate()), 'yyyyMMdd'))