Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

w2ksp4.exe, WwwxxXdbf, procmail "FROM_MAILER" patch, Use of assignment to $[ is deprecated at /usr/local/sbin/apxs line 86. , wwwxxx vim, mysql closing table and opening table, 800c5000, setgid operation not permitted, pciehp: acpi_pciehprm on IBM, WWWXXX.DBF

Links

XODOX
Impressum

#1: Difference between two dates in Weeks and Days

Posted on 2006-06-28 10:37:05 by davidgordon

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

Report this message

#2: Re: Difference between two dates in Weeks and Days

Posted on 2006-06-28 11:05:16 by exjxw.hannivoort

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
> 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 ?
>

Yes.


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)

Report this message

#3: Re: Difference between two dates in Weeks and Days

Posted on 2006-06-29 03:24:35 by Kyle Peterson

http://www.powerasp.com/content/new/function-reference-19.ht m

"David" <davidgordon@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
>

Report this message