is it possible to count with date in MidletPascal. ex (delphi code)
Edit1.text := DateToStr (date - 25);
is it possible to count with date in MidletPascal. ex (delphi code)
Edit1.text := DateToStr (date - 25);
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...
-Originally Posted by 123jklm
edit: sorry i forget that date are a float..
From brazil (:
Pascal pownz!
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.Originally Posted by 123jklm
Sorry I can't be more specific, but I've never actually used MidletPascal.
:: AthenaOfDelphi :: My Blog :: My Software ::
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...
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 aroundOriginally Posted by 123jklm
Determined to crack this programming lark...
Bookmarks