Forum Discussion

ConsueloViramon's avatar
ConsueloViramon
Qrew Member
2 years ago

Future date, formatted weekday, Month, day

Hi there,

I'm a complete beginner, so please bear with me.
I need a field that shows Weekday, Month and day, with seven days in advance, except for Sundays and Saturdays. 

So if today is Monday, Jan 1st, I need it to show Monday, Jan 8th. 
If today is Saturday, Jan 6th, I need it to show Monday, Jan 8th.

I know I need a date/Formula field, but I'm not sure what to put in the Formula. 

Thanks in advance!


------------------------------
Consuelo Viramonte
------------------------------

1 Reply

  • PrashantMaheshw's avatar
    PrashantMaheshw
    Qrew Assistant Captain
    HI Consuelo,

    Assuming your data field is [date]
    --
    1. Day ofWeek function gives you the day number , Sun-0,Mon-1,Tue-2..Sat-6
    2. If day number if 1-5 , we shift it regularly 
    3. If day number is 0 or 6 , we shift to next Monday as you requested 



    var number da = DayOfWeek([Date]);

    If($da>0 and $da<6,NextDayOfWeek([Date], $da),NextDayOfWeek([Date], 1))

    ------------------------------
    Prashant Maheshwari
    ------------------------------