Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Cobol Misc > Re: Integer of ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 125 of 183
Post > Topic >>

Re: Integer of date function

by "Thomas" <tmanal@[EMAIL PROTECTED] > Sep 12, 2006 at 03:18 AM

Hi,

I found this solution for you:
       01  date-ymd  pic 9(8) value 20060912.
       01  iod       pic 9(8).

           compute iod =
               function rem (function integer-of-date (date-ymd) , 7)
           evaluate iod
              when 0 display "Sunday"
              when 1 display "Monday"
              when 2 display "Tuesday"
              ...
              when 7 display "Saturday"
           end-evaluate
Perhaps it helps.

Greetings  Thomas


Ubiquitous schrieb:

> jeff@[EMAIL PROTECTED]
 wrote:
>
> >I have a program and am not very familiar with the integer of date
> >function. My boss wants a re****t with a start date end-date and number
> >of prior years to compare. The catch is he does not just want 070106 -
> >072006 he wants the actual corresponding day of last year. Which would
> >be 070106 Sat  070205 Sat. Does anyone have a way to handle this?
>
> Isn't there a function which would take the number of day and convert
> it to text? If not, just write an EVALUATE statement like:
>
> 	EVALUATE number-of-day
>                  WHEN 0 THEN
>                       MOVE 'SUNDAY' to text-of-day
>                  WHEN 1 THEN
>                       MOVE 'MONDAY' to text-of-day
>                  WHEN 2 THEN
>                       MOVE 'TUESDAY' to text-of-day
>   etc.
>
>
>
> --
> It is simply breathtaking to watch the glee and abandon with which
> the liberal media and the Angry Left have been attempting to turn
> our military victory in Iraq into a second Vietnam quagmire. Too bad
> for them, it's failing.
 




 3 Posts in Topic:
Integer of date function
jeff@[EMAIL PROTECTED]   2006-07-20 12:42:46 
Re: Integer of date function
Ubiquitous <weberm@[EM  2006-09-10 06:17:08 
Re: Integer of date function
"Thomas" <tm  2006-09-12 03:18:37 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 8:42:44 CST 2008.