Breaking date into financial years php code

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
hoteljamaca
New php-forum User
New php-forum User
Posts: 12
Joined: Sat Feb 28, 2009 11:13 am

Thu Jun 30, 2011 12:09 pm

Language used:PHP

I have a form to enter
CNumber
DateFrom
DateTo

On clicking Submit, I want the functionality to break up the dates into financial years.
Eg- INPUT Through Above Form
CNumber:1
DateFrom:12/12/2013
DateTo:31/03/2014

Then the ( OUTPUT )values to be inserted in table should be
CNumber:1
DurationFrom:12/12/2011
DurationTo:31/03/2012

CNumber:1
DurationFrom:01/04/2012
DurationTo:31/03/2013

CNumber:1
DurationFrom:01/04/2013
DurationTo:31/03/2014

I hope the logic is clear.
I'm unable to code the above problem.

Thanks for your help..!!

User avatar
egami
php-forum GURU
php-forum GURU
Posts: 2192
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Tue Jul 05, 2011 7:34 am

those are some long years!

Is this homework? what's the point of this?


you're going to need to do some research on:

explode();

Post Reply