tag:infinitekind.tenderapp.com,2009-01-14:/discussions/moneydance-development/2849-how-to-enter-dates-as-longInfinite Kind: Discussion 2020-09-24T03:40:23Ztag:infinitekind.tenderapp.com,2009-01-14:Comment/484244442020-06-24T22:36:57Z2020-06-24T22:36:57ZHow to enter dates as long<div><p>Hi Bob,</p>
<p>This is my fault - I've neglected to make an int date method for the account creation date, so it is using the long value which is returned from the java.util.Date object's getTime() method.</p>
<p>There are a few ways to resolve this, but the simplest way that comes to mind, starting with an int YYYYMMDD date, is to use something like this:</p>
<pre>
<code>import com.infinitekind.util.DateUtil;
int intDate = 20200624;
long longDate = DateUtil.convertIntDateToLong(intDate).getTime();</code>
</pre>
<p>Or if you are already using java's Date class you can call getTime() on it to get the long value that moneydance is looking for. I'll add methods to get and set the date as an int, but of course that's not going to help you in the short term.</p>
<p>Thanks,<br>
Sean</p>
<p>--<br>
Sean Reilly<br>
Developer, The Infinite Kind<br>
<a href="https://infinitekind.com">https://infinitekind.com</a></p></div>Sean Reillytag:infinitekind.tenderapp.com,2009-01-14:Comment/484244442020-06-24T23:56:37Z2020-06-24T23:56:37ZHow to enter dates as long<div><p>*////////////////////////////////</p>
<hr>
<p>--------------------------------------]</p></div>-Kevin N.tag:infinitekind.tenderapp.com,2009-01-14:Comment/484244442020-06-25T00:19:48Z2020-06-25T00:20:10ZHow to enter dates as long<div><p>Please ignore my previous post.</p>
<p>Somehow my cat did that while I was away from my computer!</p>
<p>I guess that's what I get for leaving my laptop open and unattended.</p>
<p>Sorry.</p>
<p>-Kevin N</p></div>-Kevin N.tag:infinitekind.tenderapp.com,2009-01-14:Comment/484244442020-06-25T01:33:34Z2020-06-25T01:33:34ZHow to enter dates as long<div><p>Hi Kevin,</p>
<p>Your cat had something to say we just need someone that can translate it :)</p></div>dwgtag:infinitekind.tenderapp.com,2009-01-14:Comment/484244442020-06-25T02:33:40Z2020-06-25T02:33:40ZHow to enter dates as long<div><p>If she starts buying stuff on E-bay, I'm going to have to put my foot down.</p></div>-Kevin N.tag:infinitekind.tenderapp.com,2009-01-14:Comment/484244442020-06-25T03:27:42Z2020-06-25T03:27:42ZHow to enter dates as long<div><p>There is a pet shop ad on Australian TV that has the animals buying over the net ....</p>
<p>Be very afraid.</p></div>dwgtag:infinitekind.tenderapp.com,2009-01-14:Comment/484244442020-06-25T03:40:03Z2020-06-25T03:40:03ZHow to enter dates as long<div><p>Thank you Sean, that's been very helpful. (Hi to the critter dwg and Kevin)</p></div>Bob B