An one-line equation in which you plug in $d_{1}$, $m_{1}$, $y_{1}$, $d_{2}$, $m_{2}$, and $y_{2}$ to get the time in days from the earlier date to the latter date might be possible, but it wouldn't be pretty.
For example, one piece of information you'd need is how many days into the year is the latter date. Let's assume the latter date is today. As I write this, it's October 30, 2014.
To figure which day of the year October 30 is, I need to add the date ($d_{2}=30$) to the number of days which came before October in this year. To do this purely by an equation, using $m_{2}=1$ for January up to $m_{2}=12$ for December, the math would look like this:
$$
d_{2} + (\frac{1}{19958400}((m_{2}-1)(178m_{2}^{10}-12824m_{2}^{9}+406221m_{2}^{8}-7436559m_{2}^{7}+86950965m_{2}^{6}-676958181m_{2}^{5}+3545249204m_{2}^{4}-12298071916m_{2}^{3}+26959705632m_{2}^{2}-33604341120m_{2}+18601228800)))
$$
This would yield 30 + 273 = 303, telling me that October 30, 2014 is the 303rd day of the year.
For reference, here's that formula run through Wolfram|Alpha (using $x$ in place of $m_{2}$, and without $d_{2}$ added).
Keep in mind that this formula only accounts for 365-day years, so further adjustment would be needed to account for leap years. Next, we'd need to repeat this equation separately for $d_{1}$, $m_{1}$, and $y_{1}$. We'd also need to account for the number of leap years between the given dates, possibly taking into account the exception for some 00 years.
Such a single-line equation would quickly become complicated. As many computers and languages have character limits on lines, it's not even certain that such a formula would even be useable.
That's why an algorithm is preferred for a problem like this. Break the problem down into individual steps which eventually terminate, and then work through the steps.