Difference between two dates in Weeks and Days
am 28.06.2006 10:37:05 von 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
Re: Difference between two dates in Weeks and Days
am 28.06.2006 11:05:16 von 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)
Re: Difference between two dates in Weeks and Days
am 29.06.2006 03:24:35 von Kyle Peterson
http://www.powerasp.com/content/new/function-reference-19.ht m
"David" 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
>