View previous topic :: View next topic
|
Author |
Message |
damu
New User
Joined: 26 Mar 2007 Posts: 4 Location: bangalore
|
|
|
|
hi all,
can any one help me by giving the logic for finding the day of the given year. |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
System information will be present in the DATE field.You can use that
System information contained in the specified conceptual data items DATE,
DAY, DAY-OF-WEEK, or TIME, can be transferred into the identifier.
Syntax:
Code: |
ACCEPT WS-VAR1 TO DATE |
The format is YYMMDD |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
The above will give the current day's information.
For any day calculation in any year you can use the common date calculation used in your firm. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
damu wrote: |
can any one help me by giving the logic for finding the day of the given year. |
Like in the Julian day of the year - YYDDD - from 1 to 366? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please clarify this
Quote: |
finding the day of the given year. |
with a couple of examples.
I believe i understand what the "given year" is, but i am not clear on "the day". |
|
Back to top |
|
|
damu
New User
Joined: 26 Mar 2007 Posts: 4 Location: bangalore
|
|
|
|
the given year means,suppose the year is 1981/05/06.what is the day of that date. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
damu wrote: |
the given year means,suppose the year is 1981/05/06.what is the day of that date. |
To give us clarity, try answering this: 2007/05/25, what is the day of that date? |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
It is my guess,he wants 'day' means 'sunday monday tuesday..etc.
I am not sure but 'May be' SQL can help in this case..
Or we have to implement what is called as Doomsday algorithm-
Please see the link-
http://everything2.com/index.pl?node_id=1023392
It should be fairly easy to implement in COBOL as C/C++ code is already given there. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
Back to top |
|
|
|