IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to get the day( sun/mon/etc) from date????


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
m_lekshmi13

New User


Joined: 23 Apr 2005
Posts: 6

PostPosted: Sat Apr 23, 2005 12:45 pm
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
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Apr 24, 2005 4:28 am
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
Reply with quote

thanx jack for ur suggestion
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
No new posts Fetch data from programs execute (dat... DB2 3
Search our Forums:

Back to Top