Originally posted by jdbf
Thanks for u r reply...that is only used to convert the date to any other formates...but what i need is if user gives two dates , i want to display how weeks are there in between those two dates...
Ex:01-jan-2004 07-jan-2004, in this date we have one week..like that...
can any one help on this ASAP
What is your defination of start of a week? 31-Dec-03 and 1-Jan-04, are these in same week or 2 different weeks?
1-jan04 and 5-jan-04 are in same week or different weeks?
If first week of an yr is taken as first 7 days of the year, then:
week1 = 1-jan-04 to 7-jan-04
week2 = 8-jan-04 to 14-jan-04
and so on.
According to this, 1jan to 7jan there are 0 weeks and 1jan to 8jan, there is 1 week. This can be obtained using