get the first and the last date of a week
Hi allI need to get the first and the last date of a specific week.I need a function that returns two date passing it just one date.The function has to calculate the first and the last date of the week of the argument date.hope to be clearregards
goiters,
> I need to get the first and the last date of a specific week.
Yup, and what's the first day of the week in your part of the world, is it Sunday or Monday?
> I need a function that returns two date passing it just one date.
No you don't, just add 7 days to the start of the week.
> hope to be clear
Well, you can hope.
Keith.
Message was edited by: corlettk - now I hope to clear ;-)
> i mean that if i pass 15/06/2007 the function has to return me 10/06/2007 and 17/06/2007.assuming you mean 10/6 and 16/6 (sun to sat)create a calendar object, set to 15/6/07.deduct the DAY_OF_WEEK from the date, add back 1 day = 10/6add 6 more days = 16/6