Page 1 of 1

compare date

PostPosted: Sat Jul 17, 2010 11:44 am
by white-shadow
hi
how i will compare 2 dates taken from the system and calculate no. of daz.

thanx in advance

Re: compare date

PostPosted: Sat Jul 17, 2010 1:44 pm
by Robert Sample
Is there a question in your post somewhere? You certainly did not ask one.

And what is a "daz"? Days I've heard of. Daze I've heard of. Daisy I've heard of. But as far as I know, there is no word in the English language "daz". Terminology is critical in IT, where similar terms can have very different meanings. I strongly recommend you either use proper English when attempting to communicate or be prepared to have many problems along the way with misinterpretation.

Assuming for the moment that you actually meant "days" and assuming as well that you are using Enterprise COBOL, you can convert each date to an integer using the FUNCTION INTEGER-OF-DATE. At this point calculating days difference becomes a matter of subtraction. If you do not know about this function, find the COBOL Language Reference manual (IBM's web site would be a good place to start looking) and read up on it.

Re: compare date

PostPosted: Sun Jul 18, 2010 12:29 am
by white-shadow
Robert Sample wrote:Is there a question in your post somewhere? You certainly did not ask one.

And what is a "daz"? Days I've heard of. Daze I've heard of. Daisy I've heard of. But as far as I know, there is no word in the English language "daz". Terminology is critical in IT, where similar terms can have very different meanings. I strongly recommend you either use proper English when attempting to communicate or be prepared to have many problems along the way with misinterpretation.

Assuming for the moment that you actually meant "days" and assuming as well that you are using Enterprise COBOL, you can convert each date to an integer using the FUNCTION INTEGER-OF-DATE. At this point calculating days difference becomes a matter of subtraction. If you do not know about this function, find the COBOL Language Reference manual (IBM's web site would be a good place to start looking) and read up on it.
fine, your guess is right. its days and its using cobol. and thanx for your answer. the problem is solved. will have to try it practically.
thanx