<p>I'm writing a file that requires dates to be in decimal format:</p>

<blockquote>
  <p><code>2007-04-24T13:18:09</code> becomes <code>39196.554270833331000</code>  </p>
</blockquote>

<p>Does anyone have a time formatter that will do this (Decimal time is what VB/Office, etc. use)?</p>

<p>Basic code goes like follows:</p>

<pre><code>final DateTime date = new DateTime(2007, 04, 24, 13, 18, 9, 0, DateTimeZone.UTC);
double decimalTime = (double) date.plusYears(70).plusDays(1).getMillis() / (Days.ONE.toStandardDuration().getMillis())); //=39196.554270833331000.
</code></pre>

<p>For the example above.</p>

<p>(I started on a DateTimePrinter that would do this, but it's too hard for now (I don't have the joda source linked, so I can't get ideas easily)).</p>

<p>Note: Decimal time is the number of days since 1900 - the . represents partial days.  2.6666666 would be 4pm on January 2, 1900</p>

What's wrong with the
getTime()
method?