Does anyone know how to convert a WEEKNUM number and year to a date, so as to give the โweek commencingโ date?
Iโve found expression for Googlesheets and excel but they donโt even begin to work in appsheet.
Thanks!
Iโm afraid we donโt have direct tool for that, but you can create that quite easily by yourself. Add one small table with two columns like [Date] and [Year]. For this table add the date of Monday when the week is 1. Then you can calculate what ever date when week number is known.
Thanks Aleksi.
Is there no expression which will yield the week commencing date?
In excel the expression is:
=DATE(A2, 1, -2) - WEEKDAY(DATE(A2, 1, 3)) + B2 * 7
where A2 is the year and B2 is the weeknumber. G-sheets has a similar expression.
Aaaโฆ I thought you were asking an expression that would solve the date directly. You can do the same with something likeโฆ DATE(CONCATENATE(โ12/29/โ,[YEAR]-1)) - WEEKDAY(DATE(CONCATENATE(โ1/3/โ,[YEAR])))+(7*[Week]). Havenโt tested but it should work.
Hi @Aleksi ,
How would I go about displaying this in โdd/mm/yyyyโ format?
Iโve tried with wrapping in text() but unsuccessful.
text(DATE(CONCATENATE(โ12/29/โ,YEAR([Date])-1)) - WEEKDAY(DATE(CONCATENATE(โ1/3/โ,YEAR([Date]))))+(7*weeknum([Date])),โdd/mm/yyyyโ)
Thanks,
Chris.
I have absolutely NO IDEA how your brain works but WOW!
Thanks a million.
By the way, are you doing this in your sleep?!
Sometimes yes Actuallyโฆ you just need to think how you can achieve the requested functionality step by step.
User | Count |
---|---|
42 | |
30 | |
25 | |
23 | |
13 |