Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
What am I doing wrong in either of the expression, the date comes to 14/01/1900. If I do not use weekstart, it comes correct, it shows me the week number, but when I add weekstart, it goes wrong.
=weekstart(week([Date Created])-1)
=weekstart(num(Week([Date Created])-1,'00'))
Thank You,
WeekStart() will return the starting date of the week
Week() will return iso week number
What exactly are you looking for??
=weekstart([Date Created],-1,0) <--previous week start date
=weekstart([Date Created],0,0) <--current week start date
=weekend([Date Created],-1,0) <--previous week end date
=weekend([Date Created],0,0) <--current week end date
=Week(weekstart([Date Created],0,0)) <--current week number
=Week(weekstart([Date Created],-1,0)) <--previous week number
Hi,
As I understand you are trying to find the first day of the previous week, if so, try the following.
If Date Created is 5/11/2022
weekstart([Date Created],-1, 0) AS WeekStart
Result: 5/2/2022 (Previous week Monday)
The first parameter is your date field, the second is period_no which allows selecting current (0), previous (-1), or the following week (1), and the third allows selecting the start day of the week
Regards,
Vitalii
@tvisha can you share the expected output ?
WeekStart() will return the starting date of the week
Week() will return iso week number
What exactly are you looking for??
=weekstart([Date Created],-1,0) <--previous week start date
=weekstart([Date Created],0,0) <--current week start date
=weekend([Date Created],-1,0) <--previous week end date
=weekend([Date Created],0,0) <--current week end date
=Week(weekstart([Date Created],0,0)) <--current week number
=Week(weekstart([Date Created],-1,0)) <--previous week number
Hi,
As I understand you are trying to find the first day of the previous week, if so, try the following.
If Date Created is 5/11/2022
weekstart([Date Created],-1, 0) AS WeekStart
Result: 5/2/2022 (Previous week Monday)
The first parameter is your date field, the second is period_no which allows selecting current (0), previous (-1), or the following week (1), and the third allows selecting the start day of the week
Regards,
Vitalii
Yes I was trying to get the weekstart of the previous week. I did that and it worked. Thanks