New of Pascal 
Author Message
 New of Pascal



Quote:
> Can any one tell me how I can present a data type as "date" like
01/12/2000
> with Pascal;
> Example: 01/07/2000 - 01/08/2000 = 31 days.

> Please help me and tell me the code, thank you!

Hi,
the only thing you can do to accomplish this, is to convert both dates
to numeric values, perform the calculation and return the results.
You can find some routines on Dr John Stockton's pages:
http://www.*-*-*.com/
or you could have a look at Timo Salmi's FAQ list
ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip
57 : How can I calculate the difference between two points of time?
HTH
Marcel
--
Please remove the *.NoSpam* entry from my eMail address when replying.
It's meant to keep Spam and Advertising out, not friends.
Please test my new web pages
http://www.*-*-*.com/
still under heavy construction


Wed, 18 Jun 1902 08:00:00 GMT  
 New of Pascal

Quote:

>Can any one tell me how I can present a data type as "date" like 01/12/2000
>with Pascal;
>Example: 01/07/2000 - 01/08/2000 = 31 days.

>Please help me and tell me the code, thank you!

You probably have have it in a record?

data : record
             day,month,year:word;
            end;

The subtract part will be a little bit more complicated.
Chaou
Heinrich



Wed, 18 Jun 1902 08:00:00 GMT  
 New of Pascal


Quote:

>Can any one tell me how I can present a data type as "date" like 01/12/2000
>with Pascal;
>Example: 01/07/2000 - 01/08/2000 = 31 days.

>Please help me and tell me the code, thank you!

Don't use that date order; it will confuse the Americans.  ISO-8601
calls for 2000-07-01 - 2000-08-01.

The required code is in my dateprox.pas, tested my mjd_date.pas, needs
version.pas, all in mjd_date.zip, via Sig line 3.

Using mjd_date, type <enter> M<enter> T<enter> and you have reached the
demo of date difference; now scan the Pascal.  ISTR that you'll just
need YMDtoMJD for the above.

If you wish to go outside BC32000 .. AD32000, study longcalc.pas (loc
cit) instead - commands #ds & sub, first.

Of course, if you'd read Timo's FAQ, you'd have seen that this is #119.

--

 Web <URL: http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links.
 PAS, EXE in <URL: http://www.merlyn.demon.co.uk/programs/> - see 00index.txt.
 Do not Mail News to me.    Before a reply, quote with ">" or "> " (SoRFC1036)



Wed, 18 Jun 1902 08:00:00 GMT  
 New of Pascal
Can any one tell me how I can present a data type as "date" like 01/12/2000
with Pascal;
Example: 01/07/2000 - 01/08/2000 = 31 days.

Please help me and tell me the code, thank you!



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. I'm new to pascal!!!

2. New to Pascal, need help please

3. new to pascal !

4. New to Pascal

5. New At Pascal Need help!

6. New at Pascal - Need help!

7. help! new to pascal

8. New to pascal, need help w/ program

9. New to Pascal---requesting...

10. new to pascal

11. New to Pascal

12. New to pascal

 

 
Powered by phpBB® Forum Software