Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
how to get the day( sun/mon/etc) from date????

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
m_lekshmi13

New User


Joined: 23 Apr 2005
Posts: 6

PostPosted: Sat Apr 23, 2005 12:45 pm    Post subject: how to get the day( sun/mon/etc) from date????
Reply with quote

a date will be inputted i should get the particular day of the week
Back to top
View user's profile Send private message
References
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1506

PostPosted: Sun Apr 24, 2005 4:28 am    Post subject:
Reply with quote

Pick any past date that is a Sunday; subtract your date from it using one of the date intrinsic functions. Divide by 7. The remainder will be:

0 if your day is Sunday
1 if your day is Monday
.
.
.
6 if your day is Saturday
Back to top
View user's profile Send private message
m_lekshmi13

New User


Joined: 23 Apr 2005
Posts: 6

PostPosted: Mon Apr 25, 2005 10:08 am    Post subject: Re: how to get the day( sun/mon/etc) from date????
Reply with quote

thanx jack for ur suggestion
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1