Skip to main content
New Participant
May 13, 2025
Solved

How to get the staring date of week using the current now() function in appian?

Hi,

How to get the staring date time of week using the current now() function in Appian?

Example suppose Wed 14-05-2025, I want to get the date of starting of week i.e Monday 12-05-2025.

Thanks

Bihitak

    mathieud0001
    Genius
    May 13, 2025

    Have you tried doing something with the weekday function?

    docs.appian.com/.../fnc_date_and_time_weekday.html

    4 replies

    mathieud0001
    Genius
    May 13, 2025

    Have you tried doing something with the weekday function?

    docs.appian.com/.../fnc_date_and_time_weekday.html

    harshas2775
    Brainy
    May 13, 2025

    now()-weekday(now(),3)

    returnType : 3 here is to have first day of week set as Monday and output index to be from 0 to 6. Ref https://docs.appian.com/suite/help/25.1/fnc_date_and_time_weekday.html 

    Happy to help. Even happier to optimize.
    davidj137213
    Brainy
    May 13, 2025

    now() - weekday(now()) + 1

    albertoc033829
    Inspiring
    May 13, 2025

    You can do it something like that:

    a!localVariables(
    local!today: todate(local(now())),
    todate(
    a!subtractDateTime(
    startDateTime: local!today,
    years: 0,
    months: 0,
    days: weekday(local!today, 3)
    )
    )
    )