hi
how i will compare 2 dates taken from the system and calculate no. of daz.
thanx in advance
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.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.