How to enter dates as long

I'm trying to enter the creation date for an account which requires a long. I' can seem to figure out how to do it, the date always ends up as the current date (which I assume is the default). It's likely easy but I'm stumped.

  1. Hi Bob,

    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.

    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:

    import com.infinitekind.util.DateUtil;
    int intDate = 20200624;
    long longDate = DateUtil.convertIntDateToLong(intDate).getTime();
    

    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.

    Thanks,
    Sean

    --
    Sean Reilly
    Developer, The Infinite Kind
    https://infinitekind.com

  2. *////////////////////////////////


    --------------------------------------]

  3. Please ignore my previous post.

    Somehow my cat did that while I was away from my computer!

    I guess that's what I get for leaving my laptop open and unattended.

    Sorry.

    -Kevin N

  4. Hi Kevin,

    Your cat had something to say we just need someone that can translate it :)

  5. If she starts buying stuff on E-bay, I'm going to have to put my foot down.

  6. There is a pet shop ad on Australian TV that has the animals buying over the net ....

    Be very afraid.

  7. Thank you Sean, that's been very helpful. (Hi to the critter dwg and Kevin)

  8. System closed this discussion on 24 Sep, 2020 03:40 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac