0

This script don't work on this week and next week

switch number('Time period') do
case 1:
    (
        'Start date' := today();
        'End date' := today()
    )
case 2:
    (
        'Start date' := date(year(today()), month(today()), day(today()) - weekday(today()));
        'End date' := date(year(today()), month(today()), day(today()) - weekday(today()) + 6)
    )
case 3:
    (
        'Start date' := date(year(today()), month(today()), day(today()) - weekday(today()) + 7);
        'End date' := date(year(today()), month(today()), day(today()) - weekday(today()) + 13)
    )
case 4:
    (
        'Start date' := date(year(today()), month(today()), 1);
        'End date' := date(year(today()), month(today()) + 1, 0)
    )
case 5:
    (
        'Start date' := date(year(today()), month(today()) + 1, 1);
        'End date' := date(year(today()), month(today()) + 2, 0)
    )
default:
    (
        'Start date' := null;
        'End date' := null
    )
end

 

This script don't work on this week and next week, is on Ninox Office Equipment template.

2 Antworten

null
    • Kruna
    • vor 1 Jahr
    • Gemeldet - anzeigen

    Hi Rafael,

    what is not working exactly? Can you pls explain what you wouod like to achieve?

    Saludos

    Kruna

      • Rafael_Sanchis
      • vor 1 Jahr
      • Gemeldet - anzeigen

       Fix the problem Krana