Results 1 to 7 of 7

Thread: date with MidletPascal

  1. #1

    date with MidletPascal

    is it possible to count with date in MidletPascal. ex (delphi code)
    Edit1.text := DateToStr (date - 25);

  2. #2

    date with MidletPascal

    I'm very sorry I am not familiar with Delphi...you could perhaps wait for someone better to come on here and help with your problem...or if you can put down in "Pseudo" code what you are trying to I might be able to help...sorry a novice at programming but have been using MIDlet Pascal for a while now...
    Determined to crack this programming lark...

  3. #3

    Re: date with MidletPascal

    Quote Originally Posted by 123jklm
    is it possible to count with date in MidletPascal. ex (delphi code)
    Edit1.text := DateToStr (date - 25);
    -
    edit: sorry i forget that date are a float..
    From brazil (:

    Pascal pownz!

  4. #4
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2

    Re: date with MidletPascal

    Quote Originally Posted by 123jklm
    is it possible to count with date in MidletPascal. ex (delphi code)
    Edit1.text := DateToStr (date - 25);
    I think the short answer is probably. The long answer is, it depends on how MidletPascal stores dates. If it uses a number format like Delphi, then the answer is yes. Ultimately, it makes sense to store dates as numbers as they are more compact (byte wise) than a string so I would say the answer is almost certainly yes. You just need to find out what format MidletPascal uses and adjust the maths accordingly.

    Sorry I can't be more specific, but I've never actually used MidletPascal.
    :: AthenaOfDelphi :: My Blog :: My Software ::

  5. #5

    date with MidletPascal

    Right...beginning to get this a little more;

    The date functions are as follows in MIDlet Pascal;

    GetYear();
    GetMonth();
    GetWeekDay();
    GetYearDay();

    All are integers...

    There is no DateToStr()

    But there is an IntegerToString();

    ...There is no RealToString(); for floatingpoint/real numbers as far as I know in MP if your using real numbers you need to use the function Trunc(); to convert it without the decimal...
    Determined to crack this programming lark...

  6. #6

    date with MidletPascal

    In delphi DateToStr (Date) show You YEAR-MONTH-DAY of this day.
    DateToStr (Date + 4000) show You 4000 days forward and
    DateToStr (Date - 4000) show You 4000 days back.
    If You want to do the same in MidletPascal must You join GetDay,GetMonth and GetYear but how.

  7. #7

    date with MidletPascal

    Quote Originally Posted by 123jklm
    In delphi DateToStr (Date) show You YEAR-MONTH-DAY of this day.
    DateToStr (Date + 4000) show You 4000 days forward and
    DateToStr (Date - 4000) show You 4000 days back.
    If You want to do the same in MidletPascal must You join GetDay,GetMonth and GetYear but how.
    I dont know... not experienced enough but can only suggest you post your code on here and see if anyone could offer a work around
    Determined to crack this programming lark...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •