Forum Discussion
Date from week and year
Hi,
I am currently working with a table, which provides year and week, but I would like to have a date (DD/MM/YYYY). As I need it to make some relationship.
Any suggestion in how to calculate the date from year and week num?
Thanks for your time
alexcatala , You can get week start date like
Week to Date = var _st = date([year],1,1)
var _week = [Week]
Return _st+((_week-1)*7) -WEEKDAY(_st,2)+1Format of date can be set under format or you set at the system level
Date as text = format([Week to Date],"dd/mm/yyyy")
2 Replies
- amitchandak
Super User
alexcatala , You can get week start date like
Week to Date = var _st = date([year],1,1)
var _week = [Week]
Return _st+((_week-1)*7) -WEEKDAY(_st,2)+1Format of date can be set under format or you set at the system level
Date as text = format([Week to Date],"dd/mm/yyyy")
- alexcatala
Helper IV
amitchandak That works!! Thanks