|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Difference between two dates in Weeks and Days
Hi,
I have an order processing system in which I have an OrderDate and a Completion Date I want to print the difference in Weeks and Days between the two dates, i.e. if the completion date is 3 weeks and 2 days after the order date, I want to print : 3 Weeks and 2 Days, on the page. Is this possible ? Appreciate your help Thanks David David wrote on 28 jun 2006 in microsoft.public.inetserver.asp.general:
> I have an order processing system in which I have an OrderDate and a Yes.> Completion Date > > I want to print the difference in Weeks and Days between the two dates, > i.e. if the completion date is 3 weeks and 2 days after the order date, > I want to print : 3 Weeks and 2 Days, on the page. > Is this possible ? > dif = DateDiff( "d", date1, date2 ) weeks = fix( dif / 7 ) restDays = abs( dif - ( weeks * 7 ) ) result = weeks & " weeks and " & restDays & " days." [not tested] -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
http://www.powerasp.com/content/new/function-reference-19.htm
Show quote "David" <davidgor***@scene-double.co.uk> wrote in message
news:1151483825.708592.80430@m73g2000cwd.googlegroups.com... > Hi, > > I have an order processing system in which I have an OrderDate and a > Completion Date > > I want to print the difference in Weeks and Days between the two dates, > i.e. if the completion date is 3 weeks and 2 days after the order date, > I want to print : 3 Weeks and 2 Days, on the page. > Is this possible ? > > Appreciate your help > > > Thanks > David > |
|||||||||||||||||||||||