Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get a date from a week number
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01670557
Message ID:
01670559
Views:
59
>Hi all,
>I've a report based on week numbers. the week ends on a Friday but that's not an issue. However I need to also get the same week number last year, so I have week 35 and I need to get week 35 last year. What I'm looking for is the Friday date in week 35 last year. The reason is that I need to then get the previous 10 weeks and the report may have to run over year so I think getting the Friday and working backwards is the best way.
>Any ideas? I can do it with brute force but looking for something elegant and fast if possible.
>~M

Are you using SQL Server? In SQL Server the best way would be to have a Dates table and so using this table you can always get any info you want.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform