Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Complete a single form program that allows the user to input two dates in the fo

ID: 3622581 • Letter: C

Question

Complete a single form program that allows the user to input two dates in the form 10/1/1978 ( month/day/four digit year)

The program should then figure out and display:

1. how many days are between the two dates: aways count from the earlier date to the later date.

2. how many weeks are between the two dates expressed to 2 decimal places

3. how many years are between the two dates expressed to 2 decimal places (assume a year has 365.2425 days in it)

Here is a link to a php program that does this. You program should have the same results:


Explanation / Answer

Dear,

1) SQL:
SELECT EXTRACT(DAY FROM DATE('2009-01-01') - DATE('2009-05-05')) FROM DUAL;

PHP:
$days=($last_date - $first_date);
2)
PHP : $weeks=($days / 7);

3) $years=($days/365);
Hope this will help you

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote