|
From YourTableWhere YourDate between .... and ....
On Wed, Nov 26, 2014 at 9:52 AM, Brian <belstsrv@xxxxxxxxx> wrote:--
I have the need to get the date of the first day of the week based
on a week number.
The date can be based off Sunday or whatever arbitrary day could be
considered as the first day of the week, if that helps.
I think you need to be more clear. Are we talking about ISO week
numbers (see John E's link)? Or do *you* choose which day of the
week? Or is that something that is given to you? Or are you given a
start date?
As an example, if I had week number of 1, the date might be
12/29/2014, week 2 would give me 1/5/2015 and so on.
Where does the 12/29/2014 come from? Is that input? Could you be
given any arbitrary date as input?
If you're not talking ISO, and you get *two* pieces of input, and
those two pieces are (1) a start date and (2) the week number, then
you can simply add the required multiple of 7 days. Taking your
example, where startDate is d'2014-12-29' and weekNumber is 2:
newDate = startDate + %days(7 * (weekNumber - 1))
But your requirements may be different. I'll wait until you clarify
before offering more.
John Y.
off
Can anyone provide some suggestions on a method to get to a date
based
the week number?list
Thank you.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,--
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please
take a moment to review the archives at
http://archive.midrange.com/midrange-l.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.