Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get a date from a week number
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01670557
Message ID:
01670559
Vues:
60
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform